Button stable

Action trigger: accent-filled primary with corner brackets, outlined secondary. Renders a native <a> when href is set (all measured site usages navigate), a native <button> otherwise.

Variants: primary secondary · A11y: pass

Hover and focus-visible are CSS states, never props (RFC §3). Chrome lives in button.css; the label typography is the extracted type/button text style (--ll-type-button-*).

Examples

Live renders — hover and keyboard states all work here.

Open the guide Role quiz
<Button variant="primary">Start a league</Button>
<Button variant="secondary">View the rules</Button>
<Button variant="primary" href="#">Open the guide</Button>
<Button variant="secondary" href="#" current={true}>Role quiz</Button>

Guidelines

Golden rules

  1. Primary carries the view's main action. Secondary supports it — same format, different weight in the hierarchy (RFC §7: iso-format arbitration; measured zones: landing CTA vs supporting actions).
  2. Navigation wears the same chrome. When the action navigates, set href: the component renders a real <a> with identical chrome and link semantics kept (RFC §3.1 — all 11 measured site usages navigate).
  3. Write labels in original casing. The uppercase treatment is CSS (text-transform), so assistive tech reads the author's casing — write children as a normal sentence (RFC §4.1).
  4. Current says where you are, not what you chose. current marks the navigation target the reader is on (aria-current="page"); a pressed or toggled control is aria-pressed — a different state, out of scope (RFC §7, 2026-09-16).

Do

  • Write the label in sentence case — the uppercase is CSS.
  • Use href when the action navigates; type only applies to the <button> rendering.
  • Put inline SVG glyphs inside children — the site's Explore-arrow pattern (RFC §3.2).
  • Set current on the one Button that leads to the page being viewed — the site's nav CTA on the Quiz page.

Don't

  • Don't fake a disabled state product-side — disabled is arbitrated out of v1 and returns via RFC (§7, 2026-08-14).
  • Don't wrap Button in an <a> — use the href prop instead.
  • Don't use secondary for the view's main call-to-action.
  • Don't use current as a toggle or a selection — that is aria-pressed, not aria-current.

The 5 accents

Each tile scopes the accent axis with data-accent on the tile itself — the element-scoped theme contract.

ambre
bleu
rouge
violet
jade

States

Each stage below holds the examples in that state. Pseudo-class states (hover, focus-visible) are never props — they are mirrored by docs-only rules derived from the component's own stylesheet. An attribute state is set on the example exactly as the component emits it from its props, so the real stylesheet applies.

default

The resting chrome — what every example renders, except the current example, which holds its own state everywhere (its props emit aria-current).

Open the guide Role quiz

hover

Versus default: primary's fill lightens toward white and an accent glow ring appears; secondary recolors its border and label to the accent. Pure CSS, never a prop (RFC §3). The current example stays filled: hover is inert on it by design.

Open the guide Role quiz

focus-visible

Versus default: a 2px accent outline at 3px offset, both variants. Keyboard-only — pointer clicks never show it (RFC §4.2).

Open the guide Role quiz

current

Versus default (secondary): accent fill, bg-coloured label, accent border; hover inert; the focus ring is unchanged. Emitted by the current prop as aria-current="page" — the CSS keys on the attribute, so the visual never exists without the semantic (RFC §3.1). Primary: attribute only, no visual (RFC §5).

Open the guide Role quiz

Props

PropTypeDefaultOptionalNote
variant "primary" | "secondary" primary no
href string — yes renders a native <a> with identical chrome; type is then ignored
type "button" | "submit" | "reset" button no button rendering only
current boolean false no emits aria-current="page" on either rendering; secondary shows the filled state, primary only the attribute (RFC §5)
onClick (e: MouseEvent) => void — yes

Accessibility pass

Semantic structure
Native <button type> or native <a href> when href is set; link semantics kept deliberately (Enter activates, Space scrolls). No ARIA role overrides; uppercase is CSS text-transform, AT reads the author's casing. current adds aria-current="page" (valid on both elements) — the one ARIA attribute the component emits.
Keyboard
Native activation, no custom key handling; focus ring only on :focus-visible — 2px accent outline, 3px offset, both variants.
Decisions
Corner brackets and hover glow are decorative pseudo-elements/box-shadow, invisible to AT. Disabled is out of v1 by arbitration (RFC §7). Contrast is computed by the gate from resolved tokens, never declared here.
Notes
Implemented per RFC §4; this status moves to pass only through the accessibility engine gate, never by assertion.