Basic

<SegmentedControl
  data={['React', 'Angular', 'Vue', 'Svelte']}
  value="React"
/>

With option objects

<SegmentedControl
  value="week"
  data={[
    { value: 'day', label: 'Day' },
    { value: 'week', label: 'Week' },
    { value: 'month', label: 'Month' },
    { value: 'year', label: 'Year', disabled: true },
  ]}
/>

Full width

<SegmentedControl
  data={['Overview', 'Analytics', 'Settings']}
  value="Analytics"
  fullWidth
/>

Sizes and colors

<SegmentedControl data={['A', 'B', 'C']} size="xs" value="A" color="primary" />
<SegmentedControl data={['A', 'B', 'C']} size="sm" value="B" color="teal" />
<SegmentedControl data={['A', 'B', 'C']} size="lg" value="C" color="green" />

Vertical orientation

<SegmentedControl
  data={['Top', 'Middle', 'Bottom']}
  value="Middle"
  orientation="vertical"
/>

Props

PropTypeDefaultDescription
data(string|SegmentedControlItem)[]—Segments to render (required)
valuestring—Value of the selected segment (SSR snapshot)
namestringautoName for the radio group
size'xs'|'sm'|'md'|'lg'|'xl'—Font size of segment labels
radius'xs'|'sm'|'md'|'lg'|'xl'|string—Border-radius of the control and segments
colorstring—Background color of the active segment indicator
fullWidthboolean—Stretches the control to fill its container
orientation'horizontal'|'vertical''horizontal'Arranges segments horizontally or vertically
disabledboolean—Disables all segments
readOnlyboolean—Prevents changing the selected segment
classstring—Additional CSS class names
styleobject—Inline styles