Skip to content

Select Module ​

The Select module provides styled dropdown inputs with configurable colors, border, background, placeholder styling, focus/disabled/error states, and optional shake animation. It also supports custom icons and checked option styling.

This is a help block
This is a help block
This is a error block

Signature:

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

Example:

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

Module:

This module is registered as form-select in the presented modules.

Dependencies

Select module uses the following Termeh global var():

ComponentTypeUsageDefault
base → separatorColorFallback border colornull
radius → normalNumberDefault input border radiusnull
gap → microNumberSpacing between select items8px
input → heightNumberInput height2.8em
input → borderColorDefault input border colorFALLBACK
input → placeholderColorDefault input placeholder colorFALLBACK
input → backgroundColorDefault input background colorwhite
input → disabled-foregroundColorDisabled option text colornull

Select module uses the following Termeh color() and variant():

Color / VariantUsageDefault
errorAccent color for invalid stateerror
primaryDefault accent colorerror
primary → foregroundDefault accent colornull
primary → readableDefault accent colornull
shade → muteFallback placeholder colornull
base → sectionItem hover background colornull

Modifiers ​

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