Skip to content

Checkbox โ€‹

A control for boolean / multi-state selection. Toggle Vue / CSS to switch the live demo and source together.

Basic โ€‹

Default checkbox; optional label and description.

Vue SFC

States โ€‹

Disabled, pre-checked and indeterminate states.

Vue SFC

Sizes โ€‹

Small, medium and large.

Vue SFC

With input โ€‹

Each step sits directly below a mono-input of the same size, which is where a mismatch shows up first. The box tracks the shared --theme-control-height-* token at half height, and the label, description and gap scale with it.

Vue SFC

Colors โ€‹

All built-in color variants.

Vue SFC

Group โ€‹

Simple group layout.

Vue SFC

Slots โ€‹

Custom label/description via slots.

Vue SFC

Event: change โ€‹

Listen for change events.

Vue SFC

Controlled โ€‹

Drive the value imperatively.

Vue SFC

Indeterminate toggle โ€‹

Toggle the indeterminate flag.

Vue SFC

Select-all group โ€‹

Master checkbox + members.

Vue SFC

Event log โ€‹

Live log of emitted events.

Vue SFC

Customized โ€‹

Custom checkbox with advanced styling.

Vue SFC

CSS Variables โ€‹

Vue SFC

Every checkbox is themed through --mono-checkbox-* custom properties. Setting one on the element, on any wrapper/ancestor, or inline all work โ€” custom properties inherit, and they pierce the shadow-DOM boundary, so the same overrides apply to <mono-checkbox> and the shadow build. The color prop sets the accent, but an explicit --mono-checkbox-accent override always wins. To re-skin globally, set the underlying --theme-* tokens โ€” they feed the defaults below.

VariableDefaultControls
--mono-checkbox-accent--theme-primaryBox fill/border when checked (set by color)
--mono-checkbox-bg#ffffffBox background when unchecked
--mono-checkbox-bordertheme border mixBox border color
--mono-checkbox-border-hoverprimary mixBox border on hover
--mono-checkbox-icon#ffffffCheck / indeterminate glyph color
--mono-checkbox-ringprimary 20%Focus-visible ring color
--mono-checkbox-shadow0 1px 2px โ€ฆBox shadow
--mono-checkbox-text--theme-textLabel text color
--mono-checkbox-description#6b7280Description text color
--mono-checkbox-radius25%Box corner radius โ€” a percentage, so it scales with size and never rounds into a circle. Absolute lengths (4px) also work.
--mono-checkbox-border-width2px (1.5px at xs/sm)Box border width
--mono-checkbox-gap0.75rem at md, 0.375rem โ†’ 1.125rem across the scaleGap between box and label

The box itself is not a variable: it is always half of --theme-control-height-* for the current size, so a checkbox stays proportional to an input or select beside it. Retune that token and the checkbox follows. Label and description sizes track --theme-title-font-* / --theme-subtitle-font-* per step.

Types โ€‹

Importimport { CheckboxProps } from 'mono-helper'
PropValueDefaultDescription
modelValuebooleanโ€”Bound checked state of the checkbox.
checkedbooleanโ€”Whether the checkbox is checked.
color'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info'โ€”Color theme of the checkbox.
size'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'โ€”Visual size of the checkbox.
disabledbooleanโ€”Disables interaction and dims the checkbox.
indeterminatebooleanโ€”Shows the indeterminate (mixed) state.
labelstringโ€”Label text shown next to the checkbox.
descriptionstringโ€”Secondary description text shown under the label.
valuestringโ€”Form value submitted when checked.
namestringโ€”Form field name of the checkbox.
ariaLabelTextstringโ€”Accessible label text for screen readers.
cssClassCheckboxCssClassโ€”Per-element class overrides.
visiblebooleanโ€”Whether the control is shown. Defaults to `true`.
visibleType'invisible' | 'none'โ€”How it hides when `visible` is `false`. Defaults to `'none'`.