Skip to content

Switch

te-switch is a checkbox styled as a toggle.

Basic

vue
<te-switch label="Notifications" />
<te-switch label="Disabled" disabled />

Props

PropTypeDefaultDescription
modelValuebooleanfalseSupports v-model.
labelstring''Text beside the switch.
disabledbooleanfalseDisables the switch.

Events

EventPayloadDescription
update:modelValuebooleanToggled.

Slots

SlotPropsDescription
default{ selected }Replaces the label.

Released under the MIT License.