Skip to content

Checkbox

Controlled checkbox with invalid, required, and indeterminate states.

Usage

vue
<script setup>
import { ref } from "vue";
import { ArchCheckbox } from "@archora/ui";

const accepted = ref(false);
</script>

<template>
  <ArchCheckbox v-model="accepted" required>Accept policy</ArchCheckbox>
</template>

Live sandbox

Checkbox can be tested directly on this page.

interactive
<Checkbox />

Props

PropTypeDefaultDescription
modelValuebooleanfalsev-model value.
labelstring-Accessible label or text.
namestring-Field name.
valuestring-Value.
disabledbooleanfalseDisables the component.
requiredbooleanfalseMarks the field as required.
invalidbooleanfalseInvalid state.
indeterminatebooleanfalseEnables the mixed state.
ariaLabelstring-aria-label.
ariaLabelledbystring-aria-labelledby.
ariaDescribedbystring-aria-describedby.

Events

EventPayloadDescription
update:modelValuevalue: booleanmodelValue change.
changeevent: EventValue change.

Slots

SlotPropsDescription
default-Checkbox label.