Segmented control for comfortable and compact data density.
DensityToggle gives tables and lists a shared control for row spacing without creating another custom toggle per surface.
Switch between comfortable and compact density.
<DensityToggle defaultValue="comfortable" />import { DensityToggle } from "@froggdesign/enter-ui-react";<DensityToggle
value={density}
onValueChange={setDensity}
/>Use this in table settings, resource lists, and admin queues where users switch between scannability and information density.
DensityToggle reuses SegmentedControl, exposing radio group semantics and keyboard-operable buttons.
value: controlled comfortable or compact.defaultValue: initial density. Defaults to comfortable.onValueChange: called with the next density.disabled: disables both options.DensityToggle uses .eui-density-toggle classes and FroggDesign tokens for layout, state, focus, and disabled styling.