Back to docs
Component

Toggle Switch

Compact switch with smooth thumb motion and custom colors.

Install

npx shadcn@latest add @native-bits/toggle-switch

Dependencies

react-native-reanimated
Try in Sandbox
controlssettingsmobile

Props

PropTypeDefaultDescription
valueboolean-Active state
onToggle(value: boolean) => void-Toggle callback
size'sm' | 'md' | 'lg''md'Switch size

Usage

```tsx
import { toggle-switch } from '@/components/native-bits/toggle-switch'

<ToggleSwitch value={enabled} onToggle={setEnabled} />
```

Source code

Loading...