# Toggle Switch Accessible toggle/switch input using native checkbox. ## Basic Example ```html ``` ## With Label ```html ``` ## Compact Variant Smaller toggle for tight spaces: ```html ``` ## Disabled State ```html ``` ## Custom Color Override the checked color: ```html ``` ## CSS Variables - `--toggle-color` - Color when checked (default: `var(--primary)`) - `--toggle-width` - Track width - `--toggle-height` - Track height ## Accessibility The toggle uses a native checkbox, so it: - Works with keyboard (Space to toggle) - Announces state to screen readers - Respects `prefers-reduced-motion` ## See Also - [Forms](https://graffiti-ui.com/llms/forms.txt) - All form inputs