Segmented
Segmented control: one of a few views or filters, the selected segment raised on control. A radio group to assistive tech; onChange gets the option.
function Segmented<T extends string>({
options,
value,
onChange,
xstyle,
animate,
...props
}: SegmentedProps<T>)API reference
| Prop | Type | Default | Description |
|---|---|---|---|
options | readonly T[] | - | |
value | T | - | |
onChange | (value: T) => void | - |
Also accepts Omit<PrimitiveProps<'div'>, 'as' | 'onChange' | 'children'>. Raw style and className are refused.
Related components
SelectNative select drawn like `TextField`, so a form's pop-up and its fields line up. Children are `<option>`s.SheetA modal card over the app. It is a non-modal `<dialog>` on purpose: `showModal` would lift the card into the top layer, and Chromium hit-tests top-layer content at its untransformed position - inside the scene's preserve-3d transform every point lands behind the card, dead to the finger. The `open` attribute keeps it in the transformed tree where hit-testing is honest, and the scrim, Escape and closing are drawn by hand. Closing is held back until the card has shrunk away, so it leaves the way it came.TextInline text or a formatted animated number.