Dev Tools
Switch
iOS-style toggle switch. Accessible via role=switch and proper label wrapping. Used for binary on/off settings.
Import
import Switch from '../../components/utility/Switch.astro'; Props
| Prop | Type | Required | Description |
|---|---|---|---|
id | string | No | HTML id for the input element (default: "switch") |
checked | boolean | No | Initial checked state (default: false) |
label | string | No | Text label displayed next to the switch |