Skip to content

Button Module ​

The Button module provides customizable action elements with support for color variants, sizes, shapes, loading, and disabled states. It extends the Element module. It can be grouped using the . buttons container for consistent spacing.

Primary
Icon
Loading
Simple CTA
Disabled
Indigo
Icon
Loading
Simple CTA
Disabled
Cherry
Icon
Loading
Simple CTA
Disabled

Signature:

scss
@mixin use-button($colors: (), $sizes: ());

Example:

scss
@include termeh.use-button(("primary", "green"), ("small", "large"));

Module:

This module is registered as button in the presented modules.

Dependencies

Button module uses the following Termeh global var():

ComponentTypeUsageDefault
gap → microNumberSpacing between button container items8px
radius → normalNumberDefault border radiusnull
radius → roundedNumberRounded button border radiusnull
decorator → sizeColorLoading spinner thicknessnull
control → heightNumberDefault button height2.2em

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

Color / VariantUsageDefault
shadeDefault focus/active outline colorerror
shade → readableDefault text/icon colornull
shade → lightDefault button backgroundnull
shade → light-activeDefault hover backgroundnull

Button Container ​

Container for buttons: .buttons

Modifiers ​

  • .is-cta → fills remaining space in .buttons container
  • .is-simple → applies minimal style, inherits text color
  • .is-light → applies light background variant
  • .is-rounded → applies rounded border-radius
  • .is-loading → applies loading state
  • .is-disabled → applies disabled state
  • .is-<size> → applies a registered size as button size
  • .is-<color> → applies a registered color as accent color