Back to library

Checkbox

Let people select several items independently or mark tasks as complete.

Recommended API

Property or elementTypeExample initial valueDescription
name and valueForm attributestasks, per itemGroup related form values while keeping each item independent.
checkedBooleanFirst task checkedSet whether each task is complete.

States

StateTriggerResult
checkedActivate an unchecked box.The item becomes complete and is styled accordingly.
uncheckedActivate a checked box.The item returns to the incomplete state.

CSS variables

VariableTypeDefaultDescription
--q-textcolor #28302aMain text and foreground color.
--q-mutedcolor #70776fColor for secondary text.
--q-font-sizelength 13pxBase size for the component text.
--q-accentcolor #344e41Accent for active controls, indicators and focus.
--q-spacelength 4pxBase unit for gaps and padding.
--q-gaplength calc(var(--q-space) * 2)Space between items, based on the spacing unit.