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.

Source
function Segmented<T extends string>({
  options,
  value,
  onChange,
  xstyle,
  animate,
  ...props
}: SegmentedProps<T>)

API reference

PropTypeDefaultDescription
optionsreadonly T[]-
valueT-
onChange(value: T) => void-

Also accepts Omit<PrimitiveProps<'div'>, 'as' | 'onChange' | 'children'>. Raw style and className are refused.

Related components