Checkbox Indicator

Alignment target:@astryxdesign/core v0.7.1 · CheckboxIndicator

Props #

PropertyTypeDefaultDescription
state'unchecked' | 'checked' | 'indeterminate'—Required. The visual state.
size'sm' | 'md''md'Indicator size.
isDisabledbooleanfalseShows disabled styling.

Slots #

  • The default slot replaces the checkmark and the dash, drawn inside the box.
  • An empty slot, including a condition that is false, keeps the marks. Use isRenderable rather than a null check.
  • Slot content is decorative. Do not put a focusable control in the slot.

Accessibility #

  • The root always has aria-hidden="true".
  • The component has no interactive role.
  • It ignores role, tabindex and contenteditable attributes.
  • It provides no click or keyboard behavior.
  • The exposed element is HTMLSpanElement | null.

Theme #

The indicator shares color variables with CheckboxInput.

  • .astryx-checkbox-indicator: outer box.
  • .astryx-checkbox-indicator-check: checkmark.
  • .astryx-checkbox-indicator-dash: indeterminate mark.
  • data-state: current visual state.
  • data-size: current size.
  • data-disabled: disabled state.