Switch

Switches communicate an immediate on or off state and support optional checked and unchecked icon affordances.

Checked: false

Props

NameDescriptionDefaultControl
disabledOptional

Whether the switch is disabled.

boolean | undefined
false
checkedIconOptional

Icon name displayed when checked.

string | undefined
"check"
uncheckedIconOptional

Icon name displayed when unchecked.

string | undefined
-
nameOptional

Name attribute for the native checkbox input.

string | undefined
-
-
valueOptional

Value attribute for the native checkbox input.

string | undefined
-
-
ariaLabelOptional

ARIA label forwarded to the native checkbox input.

string | undefined
-
-
checkedRequired

-

boolean
-

Events

NameTypeDescription
update:checked[value: boolean]-

Slots

NameParametersDescription
default-Optional label content rendered next to switch.

Default

Checked: false

With Icon

States