KCheckbox
示例
Checkboxes
Accepted: false, Subscribed: true
Checkbox with v-model binding, indeterminate state, and optional label.
Props
| Name | Type | Default | Description |
|---|---|---|---|
| modelValue | boolean | false | Bound value via v-model. |
| disabled | boolean | false | Whether the checkbox is disabled. |
| indeterminate | boolean | false | Whether to show the indeterminate (minus) state. |
| label | string | — | Optional label text displayed next to the checkbox. |
Emits
| Name | Parameters | Description |
|---|---|---|
| update:modelValue | (value: boolean) | Emitted when the checkbox is toggled. |
Basic Usage
vue
<script setup>
import { ref } from 'vue'
import { KCheckbox } from '@kK-2004/ui-component'
const checked = ref(false)
</script>
<template>
<KCheckbox v-model="checked" label="Accept terms" />
</template>