Skip to content

Radio Module

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

Signature:

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

Example:

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

Radio module uses the following Termeh global var():

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

Radio 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="radio"] → the radio input element