Switch
Toggle switch for boolean states. Supports label and description text.
Preview
Usage
import { Switch } from '@ramtt/ui'
<Switch checked={enabled} onChange={setEnabled} label="Notifications" />
<Switch
checked={darkMode}
onChange={setDarkMode}
label="Dark mode"
description="Use dark theme across the app"
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| checked* | boolean | — | Switch state |
| onChange* | (checked: boolean) => void | — | Change handler |
| label | string | — | Label text |
| description | string | — | Description below label |
| disabled | boolean | false | Disable the switch |