Usage
Use v-model to make the toggle component reactive.
Example radio options
<script lang="ts" setup>
const toggleValue = ref(false)
</script>
<template>
<div class="max-w-40">
<CToggle
v-model="toggleValue"
label="Example radio options"
/>
</div>
</template>
Disabled
Example radio option
<template>
<CToggle disabled label="Example radio option" />
</template>
Props
| Prop | Default | Type |
|---|---|---|
label | string | |
modelValue | false | boolean |
disabled | boolean | |
id | string |