Switch
On/off toggle. Use for binary settings where the result is immediate (no Save button needed).
Default
Bound with v-model.
With label
Pair with a Label for click targets.
With description
Add a muted description under the label to explain what the toggle controls.
Receive emails about new products.
Sizes
The size prop offers sm and default. For anything larger, scale with a utility class such as scale-125.
Disabled
Disable input.
Invalid
Set data-invalid on the Field and aria-invalid on the Switch, then use FieldError for the message.
Turn this on to receive alerts on your devices.
- Enable notifications to continue.
Choice card
Wrap each Field inside a FieldLabel to turn switches into selectable cards. The active card is highlighted automatically.
API Reference
Switch
Accessibility
Keyboard shortcuts and ARIA behavior.
- Uses role=switch with aria-checked reflecting the on/off state.
- Pair with a label so the control's purpose is announced.