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";
import "capsomer/tokens.css";
import "capsomer/eyebrow.css";
import { Eyebrow } from "capsomer/react/eyebrow";
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
| Prop | Type | Required | Does |
|---|
children | ReactNode | Yes | |
|---|
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. |
|---|
id | string | | |
|---|
className | string | | |
|---|
CSS variables
| Variable | Default |
|---|
--cap-eyebrow-color | var(--muted) |
|---|
--cap-eyebrow-size | var(--fs-label) |
|---|
--cap-eyebrow-weight | var(--weight-semibold) |
|---|
Parts and data attributes
| Class | Is |
|---|
.cap-eyebrow | the root |
|---|
| Attribute | Values |
|---|
data-tone | accent dim text |
|---|
data-variant | mono |
|---|
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).