Typography

Text Group

Caption, heading, and subline composition with configurable semantic tags, size tiers, alignment, and optional icon.

Overview

TextGroup pairs a caption, heading, and subline into the typographic shape used inside hero banners, page heroes, section headers, and content cards. Semantic tags for each line are configurable via captionTag, headingTag, and sublineTag so the same visual composition can render as <h1>-led on a page hero and <h3>-led inside a card without rewriting markup.

For one-off campaign treatments, the captionColor, headingColor, sublineColor, and iconColor props accept any CSS color string and inline it onto the matching element, so a single hero can repaint a heading or caption without touching tokens.

Key Business & UX Benefits

  • One composition covers hero, page header, section header, and card text, so editorial hierarchy stays consistent without bespoke layout per surface.
  • Configurable semantic tags keep the SEO outline correct: hero stays <h1>-led, cards stay <h3>-led, without rewriting visual markup.
  • Per-line color override props give marketing a precise repaint hook for seasonal banners without touching theme tokens.

Usage

TextGroup Default
<TextGroup
    caption="Featured"
    heading="New collection"
    heading-tag="h2"
    subline="Spring/Summer drop"
    size="l"
  />

Feature List

  • Three configurable semantic tags (`captionTag`, `headingTag`, `sublineTag`) keep the SEO outline correct as the same composition moves between hero and card
  • Global `size` tier maps to canonical per-element Text sizes; per-line overrides (`captionSize`, `headingSize`, `sublineSize`) fine-tune density
  • `align` controls horizontal alignment of all three lines together, so left-rail and centered hero patterns share one prop
  • Optional `icon` plus `iconSize` and `iconColor` overrides render an icon above the caption for status-led intros
  • Freeform `captionColor`, `headingColor`, and `sublineColor` props accept any CSS color string and inline it per line for one-off campaign treatments
  • `gap` prop ('xs', 's', 'sm', 'm', 'l') tunes vertical rhythm between the caption, heading, and subline

API Reference

PropDefaultType
iconstring

Optional icon rendered above the caption/heading (e.g. essentials/info).

iconSizem

Icon size — maps to the Icon component's size scale.

iconColorstring

Freeform color override for the icon (CSS color string).

captionstring

Caption (eyebrow) — rendered above the heading.

headingstring

Main heading text.

sublinestring

Subline — rendered below the heading.

captionTagspan

Semantic tag for the caption.

headingTagh2

Semantic tag for the heading.

sublineTagp

Semantic tag for the subline. Defaults to <p> — set to h3/h4 when the subline functions as a sub-heading rather than descriptive copy.

sizem

Global size tier. Maps to canonical per-element Text sizes.

captionSize

Overrides the mapped Text size for the caption.

headingSize

Overrides the mapped Text size for the heading.

sublineSize

Overrides the mapped Text size for the subline.

alignleft

Horizontal alignment of the three elements.

gapxs

Vertical gap between the three elements.

captionColorstring

Freeform color override for the caption (CSS color string).

headingColorstring

Freeform color override for the heading (CSS color string).

sublineColorstring

Freeform color override for the subline (CSS color string).

Copyright © 2026 Laioutr GmbH