Skip to content

Eyebrow

The small uppercase label over a block or a section, in the interface face or the mono face.

<div class="eyebrow-demo">
  <p class="cap-eyebrow" id="eb-muted">How it works</p>
  <p class="cap-eyebrow" data-tone="accent" id="eb-accent">Recovery</p>
  <p class="cap-eyebrow" data-variant="mono" id="eb-mono">Sample data</p>
  <p class="cap-eyebrow" data-variant="mono" data-tone="accent" id="eb-mono-accent">Subject</p>
  <p class="cap-eyebrow" data-tone="text" id="eb-text">Release notes</p>
  <p class="cap-eyebrow" data-tone="dim" id="eb-dim">Archived</p>
</div>

Installation

// package.json: "capsomer": "github:DrDustinEdwards/capsomer#v0.152.2"
import "capsomer/tokens.css";
import "capsomer/base.css";
import "capsomer/eyebrow.css";

Usage

<p class="cap-eyebrow" data-variant="mono" data-tone="accent">Recovery</p>

Examples

As a section heading

<div>
  <h3 class="cap-eyebrow" data-variant="mono">Recovery queue</h3>
  <p>Three sample payments.</p>
</div>

API reference

Eyebrow

PropTypeRequiredDoes
childrenReactNodeYes
variant"mono""mono": the mono face. Omitted: the interface face.
tone"muted" | "dim" | "accent" | "text"
as"p" | "span" | "h2" | "h3" | "div"The element: a paragraph by default; a span inside a line; a heading when it names a section on its own.
idstring
classNamestring

CSS variables

VariableDefault
--cap-eyebrow-colorvar(--muted)
--cap-eyebrow-sizevar(--fs-label)
--cap-eyebrow-weightvar(--weight-semibold)

Parts and data attributes

ClassIs
.cap-eyebrowthe root
AttributeValues
data-toneaccent dim text
data-variantmono

Accessibility

Nothing to operate.

  • Uppercase is CSS, so a screen reader reads the words as written, not letter by letter.
  • --muted and --accent-text at 11px reach 4.5:1 in both themes (contrast report).