Back to docs
Component

Segmented Control

Sliding segmented tabs for view or filter selection.

Install

npx shadcn@latest add @native-bits/segmented-control

Dependencies

react-native-reanimated
Try in Sandbox
controlsnavigationmobile

Props

PropTypeDefaultDescription
optionsstring[]-Segment labels
valuestring-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...