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)
valuestringValue 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'|stringBorder-radius of the control and segments
colorstringBackground color of the active segment indicator
fullWidthbooleanStretches the control to fill its container
orientation'horizontal'|'vertical''horizontal'Arranges segments horizontally or vertically
disabledbooleanDisables all segments
readOnlybooleanPrevents changing the selected segment
classstringAdditional CSS class names
styleobjectInline styles