Forms
Switch
Changes a setting that takes effect immediately.
idle
Usage
Examples
Workspace preferences
Choose how this workspace syncs and displays content.
Permissions and validation
Recommendations
| Guidance | Practice |
|---|---|
| Do | Describe the setting in its enabled state. Keep immediate changes visible and explain failed updates. |
Usage boundaries
| Guidance | Boundary |
|---|---|
| Scope | Use Checkbox for choices collected before submission. The application owns saving and rollback. |
API reference
Public props from @mizen-labs/ui. Use exported prop types for the complete TypeScript contract.
| Prop | Type | Default | Description |
|---|---|---|---|
| | false | Controls the on state. |
| | false | Sets the initial on state. |
| | — | Receives checked-state changes. |
| | false | Prevents interaction. |
| | false | Marks the switch invalid. |
| | false | Prevents changes while keeping the state readable. |
| | "default" | Selects the control size. |