Selection

Checkbox

A single checkbox input with label and description.

vue
<UiCheckbox />

Options

One block per prop — what it does, and what it looks like set.

Model value

modelValue is whether the box is checked, bound two-way with v-model.

Label

label is the text beside the box — and the whole of it is clickable, not just the box.

Description

description is secondary text below the label — the place for the caveat that would otherwise make the label too long to scan.

Required

required shows an asterisk after the label. Marking the field is all it does — the validation belongs to the form.

Disabled

disabled disables interaction with the checkbox.

Color

color is the checked state's color.

Variant

variant decides how much surface the row carries. list is a plain row with no box; card wraps the whole row in a tinted surface that fills in when checked, which suits a standalone option toggle.

variant="card" wraps the whole row in a bordered, highlightable card rather than changing the indicator itself.

Highlight

highlight fills a checked card with its color instead of the neutral fill — the same card, only the colour changes. Unchecked cards stay neutral, and it does nothing to a list checkbox.

Indicator

indicator sets which side the box sits on, or hidden to drop it entirely.

indicator="hidden" removes the visible box but keeps the label clickable and the checkbox semantically checked/unchecked — useful for card-style toggles where the box would be redundant.


Examples

The component in real use: compositions that answer "how do I build X with this", rather than one prop at a time.

Indicator position on cards

Every indicator works on a card too. start is the default; end moves the box to the right edge, for when the label should lead; hidden drops it, leaving the card's fill to show which are checked — it stays a real checkbox underneath, so it's still clickable and announced.

Hidden indicator stays functional

indicator="hidden" removes the visible box but keeps the label clickable and the checkbox semantically checked/unchecked — useful for card-style toggles where the box would be redundant.


API Reference

Generated from the component's source — props, slots and emits as the component actually declares them.

Props

Prop
Type
Default
Description
boolean
false
Whether the checkbox is checked.
string
—
The label displayed next to the checkbox.
string
—
Secondary text displayed below the label.
boolean
false
Shows a required asterisk after the label.
boolean
false
Disables interaction with the checkbox.
"neutral" | "primary" | "secondary" | "success" | "error" | "warning" | "info" | "pending"
'primary'
The color of the checkbox when checked.
"list" | "card"
'list'
Displays as a plain list item or a tinted card that fills in when checked.
boolean
false
Fills a checked card with `color` instead of the neutral fill — the same card, only its colour changes, like a highlighted `PricingPlan`. Only affects `variant="card"`.
"start" | "end" | "hidden"
'start'
Position of the checkbox indicator relative to the label, or 'hidden' to omit it entirely.

Slots

Slot
default

Emits

Event
Payload
Description
update:modelValue
[value: boolean]
—