DensitySwitch
Comfortable or compact for the whole page: compact fits more rows in the same screen. The choice is remembered in this browser.
import { DensitySwitch } from '@sypnia/ui/react'
On this page
Comfortable or compact
Code
import { DensitySwitch, SurfaceSwitch } from '@sypnia/ui/react';
// Press it: the whole page changes between night and paper, and this browser remembers it.
export default function Surface() { return <div className="sy-row"><SurfaceSwitch /><DensitySwitch /></div>; } When to use it
Use it when
- Consoles with long tables, next to the SurfaceSwitch.
Do not use it when
- Phones: compact targets are harder to touch.
For everyone
- It is a toggle button that says the current density.