Switch
Instant boolean toggles. Immediate feedback. Modern UX.
Deploy on push to main
Preview URL for every pull request
Maintenance mode
Installation
pnpm dlx nachui add switchAnatomy
Variants
Default
Deploy on push to main
Preview URL for every pull request
Maintenance mode
With Label
Switch component alongside a label for context.
Text the on call engineer when a service goes down.
Warn the workspace owner at 80% of the plan limit.
Disabled
A disabled state stops interactions.
Always on for production projects.
Available on the Enterprise plan.
API Reference
Switch
| Prop | Type | Default | Description |
|---|---|---|---|
onCheckedChange | (checked: boolean) => void | - | Callback when checked state changes |
disabled | boolean | - | Disables the switch |
Found something to improve?
Notice a bug, typo, or missing detail on this page? Help us make the documentation better by opening a GitHub issue.