Skip to content

Checkbox Module

The Checkbox module provides customizable checkbox inputs with configurable colors, border, radius, checked state, focus state, disabled state, and RTL/LTR support.

Signature:

scss
@mixin use-checkbox($colors: ());

Example:

scss
@include termeh.use-checkbox(("primary", "error"));
Dependencies

Checkbox module uses the following Termeh global var():

ComponentTypeUsageDefault
baseseparatorColorFallback border colornull
radiusnormalNumberDefault input border radiusnull
gapmicroNumberSpacing between input and label8px
inputheightNumberInput height2.8em
inputcheckboxNumberCheckbox item height1.2em
inputborderColorDefault input border colorFALLBACK
inputdisabled-foregroundColorDisabled input accent colornull
inputdisabled-borderColorDisabled input border colornull

Checkbox module uses the following Termeh color():

Color / VariantUsageDefault
errorAccent color for invalid stateerror
primaryDefault accent colorerror

Modifiers

  • .is-invalid / :invalid → applies error styling with shake animation
  • .is-disabled / :disabled → applies disabled styling
  • .is-<color> → applies a registered color as accent color

Child Elements

  • input[type="checkbox"] → the checkbox input element