Checkbox

The e-checkbox component captures boolean or mapped on/off values with a field-consistent contract, including validation, helper details, and disabled/readonly states.

Use this page to validate interaction patterns, model mapping, and accessibility-friendly labeling before integrating checkbox flows into production forms.

Usage

Use this baseline playground to configure checkbox behavior in context: color, outlined, disabled, readonly, tonal, and retain-color for stronger state continuity.

Required for deployment checklist
primary

Visual variants

Compare default, outlined, tonal, retain-color, active, disabled, and readonly states to keep semantic intent clear in dense forms.

Custom values

Map checkbox state to domain values with true-value and false-value when your form contract is not strictly boolean.

Toggle to mark deployment readiness

Current model value

hold

Named slots

Use the label slot to render richer labels with links or helper context while keeping native checkbox semantics.

Validation

Validate consent-style flows with required rules and explicit submit-state feedback before continuing critical actions.

Submit to validate the checkbox rule.

Props

Use the API table as the source of truth for accepted types, defaults, and inherited field behavior.

PropertyTypeDefault
modelValueboolean | string | numberundefined

Current checkbox value. Checked state is resolved by strict equality against trueValue.

trueValueboolean | string | numbertrue

Value emitted when the checkbox becomes checked.

falseValueboolean | string | numberfalse

Value emitted when the checkbox becomes unchecked.

tonalbooleanfalse

Shows field overlay styling inside the control slot without changing behavior.

clearablebooleanfalse

Shows clear action when a value exists.

colorstring"primary"

Base theme color applied to field state and interactions.

outlinedbooleanfalse

Uses outlined visual variant for the field container.

disabledbooleanfalse

Disables interaction and prevents value updates.

readonlybooleanfalse

Prevents editing while preserving focus behavior.

densebooleanfalse

Applies denser vertical spacing inherited from Field.

retainColorbooleanfalse

Keeps active color styling after focus/interaction.

labelstring | numberundefined

Field label text.

labelMinWidthstring | numberundefined

Minimum width reserved for label region.

labelBehavior"static""static"

Label behavior is static for checkbox controls.

inputAlignleft | right | center | start | end"start"

Horizontal text alignment inside input/selection area.

prependIconstring | IconPath | IconPath[]undefined

Icon rendered in outer-left affix region.

prependInnerIconstring | IconPath | IconPath[]undefined

Icon rendered before content inside input frame.

appendInnerIconstring | IconPath | IconPath[]undefined

Icon rendered after content inside input frame.

appendIconstring | IconPath | IconPath[]undefined

Icon rendered in outer-right affix region.

detailstringundefined

Helper text shown in details area when no errors are present.

detailsOnMessageOnlybooleanfalse

Shows details area only when messages/errors exist.

rulesFieldRule[]undefined

Validation rules evaluated against modelValue.

detailErrorsstring[]undefined

Explicit error messages rendered in details area.