Switch
Installation
Usage
import { Switch } from '@/components/pumki-ui/switch.tsx';<Switch />Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Label or content to display next to the switch. |
className | string | — | Custom CSS classes for the switch container. |
isSelected | boolean | false | Whether the switch is on (controlled). |
defaultSelected | boolean | false | Initial selected state (uncontrolled). |
isDisabled | boolean | false | Whether the switch is disabled. |
isReadOnly | boolean | false | Whether the switch is read-only. |
onChange | (isSelected: boolean) => void | — | Callback when the switch value changes. |
Last updated on