Components · Form Controls
Toggle control for binary on/off settings. Built on Radix UI Switch.
import { Switch } from '@nexub/react';| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
| checked | boolean | — | — | Controlled checked state. |
| defaultChecked | boolean | false | — | Uncontrolled initial state. |
| onCheckedChange | (checked: boolean) => void | — | — | Callback when checked state changes. |
| disabled | boolean | false | — | Disables interaction. |
| size | 'sm' | 'md' | 'lg' | 'md' | — | Switch size. |