Switch

The Switch component is a form control that allows users to toggle between two states. It provides a visual representation of a boolean value and can be customized with labels and different styles.

Props

NameDefaultType
modelValueboolean
The current state of the switch
labelstring
The label text for the switch
disabledfalseboolean
Whether the switch is disabled
accentfalseboolean
Whether to use the accent color
reversedfalseboolean
Reverses the switch and label positions
hintstring
Helper text displayed below the switch

Events

NamePayloadDescription
update:modelValuebooleanEmitted when the switch state changes

Slots

NameAcceptsDescription
defaultanyContent to be displayed as the label (overrides the label prop if provided)