Components
Switch
A binary on/off toggle for settings that take effect immediately.
Disabled
Usage
import { Switch, Label } from '@onersoft/design-system'
<Switch id="notifications" defaultChecked onCheckedChange={setOn} />
<Label htmlFor="notifications">Notifications</Label>Props
Switch mirrors Radix Switch.Root.
| Prop | Type | Default |
|---|---|---|
checked | boolean | — |
defaultChecked | boolean | — |
onCheckedChange | (checked) => void | — |
disabled | boolean | false |