PillHeader
Hero example
When to use
Reach for PillHeader at the top of marketing How-It-Works sections — each major section opens with a PillHeader showing the lifecycle stage label on the left and the primary CTA + Docs link on the right. The visual identity is "glass pill spans the full content width." The pattern reads as a section anchor: it tells the reader which phase they're looking at and gives them a way to act on it (try the dashboard) or read more (docs).
Don't reach for PillHeader inside the dashboard — the marketing-tier glass-pill geometry doesn't fit a dense product surface. For dashboard section headers use DisplayHeading + a buttons row. Don't use PillHeader for navigation either; it's structural, not navigational.
Anatomy
Two structural regions inside a <div class="glass m-pill-header">:
- Label region (
.m-pill-header__label). Optionaliconprop (typically a lifecycle dot — peach for Create, amber for Manage, lavender for Exit) + label text. - Actions region (
.m-pill-header__actions). Primary CTA (<a class="btn btn--pri btn--sm-pill">) + Docs link (<a class="btn btn--ghost btn--sm-pill">with a trailing↗glyph).
The whole pill sits on the Glass material — the marketing-page bloom backdrop provides the saturation that makes the refraction land.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| icon | React.ReactNode | — | — |
| labelrequired | string | — | — |
| primaryLabelrequired | string | — | — |
| primaryHref | string | "#" | — |
| docsHref | string | "#" | — |
| className | string | — | — |
primaryHref and docsHref default to "#" — the design-site preview uses these to render without consumer wiring. In production, both are required.
States
| State | Trigger | Visual |
|---|---|---|
| Default | Initial render | Static glass pill |
| Hover (CTA) | Mouse hover on a button | Hover lift; background brightens |
| Focus-visible | Keyboard focus | Peach focus ring on the focused button |
Density
Density-agnostic — PillHeader is marketing-tier. The Glass material and CTA geometry stay fixed.
Themes
Tokens consumed
Surface reads --surface-glass. Primary CTA reads --action-primary. Ghost CTA reads --fg-muted with --ink-6 hover.
Accessibility
- Keyboard interactions. Tab → primary CTA → Docs link. Enter activates the focused link.
- ARIA roles and properties. No role override on the pill. CTAs are
<a>elements with implicitlinkrole. The lifecycle-dot icon (if passed) carriesaria-hidden. - Focus order. DOM order: primary CTA first, Docs second.
- Screen-reader expectations. Reading order: label text, "
{primaryLabel}, link", "Docs, link." The trailing↗glyph isaria-hidden. - Reduced motion. Hover lift collapses to opacity.
- Forced colors. Glass →
CanvaswithButtonBorder. CTAs →ButtonFace/ButtonText. - WIG rules. Real
<a>for navigation (link-vs-button rule). Decorative↗glyph carriesaria-hidden(decorative-icon rule).:focus-visiblering on each link.
Do / Don't
primaryHref and docsHref. The defaults are previews only.label short ("Create", "Manage", "Exit"). One lifecycle word.Recipes
This component appears in:
- The marketing site's How-It-Works section.
- Lifecycle-phase landing pages.
Code example
import { PillHeader } from "@matter/components";
export function CreateSectionHeader() {
return (
<PillHeader
icon={<LifecycleDot phase="create" />}
label="Create"
primaryLabel="Try Create"
primaryHref="/get-started/create"
docsHref="/docs/lifecycle/create"
/>
);
}Source
packages/components/src/PillHeaderMatterMarkAvatar
Square→circle spinning Matter mark — the assistant's presence chip. 28px black circle with an inner white square that dwells, accelerates into a near-circle from motion blur, decelerates, and settles. Five phantoms fade in during the fast middle to soften the silhouette.
DisplayHeading
Sized display heading — five sizes (mega → sub) map to V1-aliased CSS recipes so V1 → V2 migration is import-path-only. Visual size is independent of the HTML heading level — pass `as` to set the right semantic element.