CataUiSwitch
A simple toggle switch component that allows users to toggle between two states (on/off).
<CataUiSwitch label="Toggle switch" v-model="switchModel" />
Examples
Basic Usage
<CataUiSwitch v-model="switchState" />
With Label
<CataUiSwitch label="Enable notifications" v-model="notificationsEnabled" />
API
Props
| Prop | Description | Type | Default | Required |
|---|---|---|---|---|
| label | Text label displayed next to the switch | String | '' | false |
| v-model | The switch state (true=on, false=off) | Boolean | true |
Events
The component uses defineModel() for two-way binding, which automatically emits update events when the switch state changes.
Slots
This component does not have any slots.
