Skip to content

Action Module ​

The Action module provides grouped interactive controls inside an .actions container. It supports secondary, loading, rounded, disabled, and color variants, and extends the Element module.

Signature:

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

Example:

scss
@include termeh.use-action(("primary", "indigo", "maroon"));

Module:

This module is registered as action in the presented modules.

Dependencies

Action module uses the following Termeh global var():

ComponentTypeUsageDefault
gap → microNumberSpacing between action items8px
radius → normalNumberDefault action border radiusnull
radius → roundedNumberRounded action border radiusnull
decorator → sizeNumberLoading spinner and focus ring sizenull
control → heightNumberDefault action height2.2em

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

Color / VariantUsageDefault
primaryDefault action backgroundnull
primary→foregroundDefault action text and spinner colornull
shadeDefault focus/active outline colornull
shade→readableSecondary action text and spinner colornull

Action Container ​

Container for action items: .actions

  • Uses a horizontal flex layout with item gaps
  • On mobile, horizontal overflow is scrollable

Modifiers ​

  • .is-secondary → transparent background with readable text color
  • .is-loading → locks the action and replaces text with a loader
  • .is-rounded → applies rounded border radius
  • .is-disabled → applies disabled style and disables interaction
  • .is-<color> → applies a registered color variant to an .actions container

Color Scope ​

Apply a color to the .actions container or any parent element. Individual .action elements do not support color classes.

  • .actions.is-primary
  • .is-primary .actions