Switch
A control that allows the user to toggle between checked and not checked.
Installation
npx shadcn@latest add https://spoke.georgedrury.co.uk/r/switchLineage
Spoke utility classes
| Class | Fallback chain | Description |
|---|---|---|
--switch-radius | 9999px | Border radius for switch |
--switch-thumb-radius | 9999px | Border radius for thumb |
--switch-checked | var(--primary) | Colour for checked switch variant |
--switch-unchecked | var(--input) | Colour for unchecked switch variant |
--switch-thumb | var(--background) | Colour for thumb switch variant |
--switch-border | transparent | Border colour for switch |
--shadow-switch | var(--shadow-xs) | Box shadow for switch |