Static checkbox for usage outside forms as visual indicator without focusing and clicking
All available props see in PrimitiveCheckbox.props.ts
<template>
<primitive-checkbox :value="value">
<input type="checkbox" :checked="value" @change="onChange" />
</primitive-checkbox>
</template>
<script setup lang="ts">
import { PrimitiveCheckbox } from '@tok/ui/components/PrimitiveCheckbox';
import { ref } from 'vue';
const value = ref(false);
const onChange = (event: Event) => {
const target = event.target as HTMLInputElement;
const _value = target.value;
// manipulate with _value
};
</script>