Back to docs
Component
Segmented Control
Sliding segmented tabs for view or filter selection.
Install
npx shadcn@latest add @native-bits/segmented-controlDependencies
react-native-reanimated
controlsnavigationmobile
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| options | string[] | - | Segment labels |
| value | string | - | Active option |
| onChange | (value: string) => void | - | Selection callback |
Usage
```tsx
import { segmented-control } from '@/components/native-bits/segmented-control'
<SegmentedControl options={['Day', 'Week', 'Month']} value={range} onChange={setRange} />
```Source code
Loading...