Skip to content

KCheckbox

示例

Checkboxes

Accepted: false, Subscribed: true

Checkbox with v-model binding, indeterminate state, and optional label.

Props

NameTypeDefaultDescription
modelValuebooleanfalseBound value via v-model.
disabledbooleanfalseWhether the checkbox is disabled.
indeterminatebooleanfalseWhether to show the indeterminate (minus) state.
labelstringOptional label text displayed next to the checkbox.

Emits

NameParametersDescription
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>