Skip to content

KSwitch ​

示例 ​

Toggle switches

Toggle switch with v-model binding, size variants, and optional label.

Props ​

NameTypeDefaultDescription
modelValuebooleanfalseBound value via v-model.
disabledbooleanfalseWhether the switch is disabled.
size'sm' | 'default''default'Size of the switch.
labelstring—Optional label text displayed next to the switch.
theme'auto' | 'day' | 'night''auto'Theme mode. auto follows the current theme; day and night force a specific mode.

Emits ​

NameParametersDescription
update:modelValue(value: boolean)Emitted when the switch is toggled.

Basic Usage ​