Skip to content

Textarea Module ​

The Textarea module provides styled multi-line text inputs with configurable colors, border, background, placeholder styling, focus/disabled/error states, and optional shake animation.

This is a help block
This is a error block

Signature:

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

Example:

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

Module:

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

Dependencies

Textarea module uses the following Termeh global var():

ComponentTypeUsageDefault
base → separatorColorFallback border colornull
radius → normalNumberDefault textarea border radiusnull
gap → microNumberDefault textarea padding8px
line-height → normalNumberTextarea line height1.6em
input → borderColorDefault textarea border colorFALLBACK
input → placeholderColorDefault textarea placeholder colorFALLBACK
input → backgroundColorDefault textarea background colorwhite

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

Color / VariantUsageDefault
errorAccent color for invalid stateerror
primaryDefault accent colorerror
shade → muteFallback placeholder 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