ComponentProduct
Switch
Toggle for settings that apply immediately, with on, off, and disabled states.
npx context-ds add switchUsage
Use it for
Settings that apply at once.
Avoid
- Switches that need a save button
Dependencies: @radix-ui/react-switch
Example
examples/switch.tsx
Source
components/ui/switch.tsx
Reference: context-dashboard c0ddf7a src/components/ui/switch.tsx.