Skip to content

Switch

A boolean toggle. Use when the action takes effect immediately; use Checkbox when the value is part of a form to be submitted.

Basic usage

Example

With labels inside

Loading

API

Props

NameTypeDefaultDescription
valuebooleanfalse
labelstringundefined
disabledbooleanfalse
loadingbooleanfalse
sizeEpSizeundefined
hueEpHue"information"
checkedTextstring""
uncheckedTextstring""
ariaLabelstringundefined

Events

EventPayloadDescription
update:value{"names":["boolean"]}
change{"names":["boolean"]}

Slots

SlotScopeDescription
checked
unchecked
default

Released under the MIT License. Built with VitePress.