Components

Links

13 components. Every one is themeable, keyboard operable, and configurable by data attribute, JSON or JavaScript.

Links

Expandable Section

A single disclosure: a trigger and a panel that opens in place.

expandable-sectioncollapsedexpandedhoverfocus

Preview

Bordered
Flush, open

Usage

Props

PropTypeDefaultDescription
titlerequired string — Trigger text.
headingLevel number 3 2–6.
open boolean false Whether it starts expanded.
summary string — Line under the title while collapsed.
items array [] Links rendered inside the panel.
text string — Plain text panel content, used when items is empty.
variant string "bordered" Visual treatment. All variants share one behaviour and one API.
One of: bordered, flush

Accessibility

  • The trigger is a button inside a heading, so the panel is a sibling of the heading — the open state lives on the item, not the trigger.
  • The panel animates grid-template-rows 0fr → 1fr, which needs no measured height and does not jank.
  • hidden="until-found" lets find-in-page open the panel, and is dropped a frame before the animation so the panel is measurable.

Design tokens

--lb-r-md --lb-outline --lb-scrim --lb-dur-normal

Links

Glass Button

A translucent control for use over a cover image. Falls back to a solid surface where backdrop-filter is unsupported.

glass-buttondefaulthoveractivefocusdisabledloading

Preview

Light glass
Dark glass

Usage

Props

PropTypeDefaultDescription
labelrequired string — The visible text. Says what happens, in the reader's words.
hrefrequired string — Destination. javascript: and non-image data: URLs are rejected.
description string — One supporting line beneath the label.
icon string — Kit glyph name, or a Simple Icons slug for a brand mark.
trailingIcon string "arrow-up-right" Set to "" to remove.
newTab boolean false target=_blank with rel=noopener and a hidden "opens in a new tab" note.
badge string — Short pill text, e.g. "New".
disabled boolean false Uses aria-disabled, so the control stays focusable and can explain itself.
disabledReason string — Announced when a disabled control is focused.
loading boolean false Spinner replaces the leading icon; the label and width stay put.
count number — Click count shown beside the label.
rel string — Extra rel tokens, e.g. "sponsored nofollow".
brand string — Service slug, e.g. "spotify". Supplies the mark and, with brandStyle, the colour.
brandStyle string "mark" How much of the service's identity to spend. mark is monochrome and changes nothing.
One of: mark, tint, outline, solid
block boolean true Full width.
size string "md" Control size.
One of: sm, md, lg
tone string "light" Which ink the glass carries — pick the one that contrasts with the image behind it.
One of: light, dark

Accessibility

  • @supports gates the blur — without it the control is solid, never an unreadable wash.
  • A 1px boundary is always present, so the control is identifiable at 3:1 with the blur switched off.

Design tokens

--lb-surface --lb-outline-strong

Links

Gradient Button

An expressive primary action. Defaults to the neutral ramp so it stays inside the achromatic palette; pass stops to opt out.

gradient-buttondefaulthoveractivefocusdisabledloading

Preview

Neutral (default)
Custom stops

Usage

Props

PropTypeDefaultDescription
labelrequired string — The visible text. Says what happens, in the reader's words.
hrefrequired string — Destination. javascript: and non-image data: URLs are rejected.
description string — One supporting line beneath the label.
icon string — Kit glyph name, or a Simple Icons slug for a brand mark.
trailingIcon string "arrow-up-right" Set to "" to remove.
newTab boolean false target=_blank with rel=noopener and a hidden "opens in a new tab" note.
badge string — Short pill text, e.g. "New".
disabled boolean false Uses aria-disabled, so the control stays focusable and can explain itself.
disabledReason string — Announced when a disabled control is focused.
loading boolean false Spinner replaces the leading icon; the label and width stay put.
count number — Click count shown beside the label.
rel string — Extra rel tokens, e.g. "sponsored nofollow".
brand string — Service slug, e.g. "spotify". Supplies the mark and, with brandStyle, the colour.
brandStyle string "mark" How much of the service's identity to spend. mark is monochrome and changes nothing.
One of: mark, tint, outline, solid
from string — Start colour. Defaults to the neutral ramp.
to string — End colour.
angle string "135deg" Gradient angle.
block boolean true Full width.
size string "md" Control size.
One of: sm, md, lg

Accessibility

  • The label colour is fixed against the darkest stop, so contrast does not depend on where along the gradient the text falls.
  • A documented deviation from the achromatic rule: chroma here is decoration, so it is opt-in per instance rather than a default.

Design tokens

--lb-grad-from --lb-grad-to --lb-on-primary

Links

Primary Button

The single most important action on the page. One per view.

primary-buttondefaulthoveractivefocusdisabledloading

Preview

Default
With description
Loading
Disabled

Usage

Props

PropTypeDefaultDescription
labelrequired string — The visible text. Says what happens, in the reader's words.
hrefrequired string — Destination. javascript: and non-image data: URLs are rejected.
description string — One supporting line beneath the label.
icon string — Kit glyph name, or a Simple Icons slug for a brand mark.
trailingIcon string "arrow-up-right" Set to "" to remove.
newTab boolean false target=_blank with rel=noopener and a hidden "opens in a new tab" note.
badge string — Short pill text, e.g. "New".
disabled boolean false Uses aria-disabled, so the control stays focusable and can explain itself.
disabledReason string — Announced when a disabled control is focused.
loading boolean false Spinner replaces the leading icon; the label and width stay put.
count number — Click count shown beside the label.
rel string — Extra rel tokens, e.g. "sponsored nofollow".
brand string — Service slug, e.g. "spotify". Supplies the mark and, with brandStyle, the colour.
brandStyle string "mark" How much of the service's identity to spend. mark is monochrome and changes nothing.
One of: mark, tint, outline, solid
size string "md" Control size.
One of: sm, md, lg
block boolean true Full width — the default shape for a link page.

Accessibility

  • Links navigate and buttons act: anything with an href renders as an anchor.
  • New-tab links carry a visually hidden note rather than relying on an icon to warn.
  • Loading locks the width and keeps the label, so the accessible name never changes mid-action.

Design tokens

--lb-primary --lb-on-primary --lb-r-pill --lb-control-h

Links

Secondary Button

The default link row: surface fill with a strong boundary, so it reads as a control without competing with the primary action.

secondary-buttondefaulthoveractivefocusdisabledloading

Preview

Default
Ghost
With count

Usage

Props

PropTypeDefaultDescription
labelrequired string — The visible text. Says what happens, in the reader's words.
hrefrequired string — Destination. javascript: and non-image data: URLs are rejected.
description string — One supporting line beneath the label.
icon string — Kit glyph name, or a Simple Icons slug for a brand mark.
trailingIcon string "arrow-up-right" Set to "" to remove.
newTab boolean false target=_blank with rel=noopener and a hidden "opens in a new tab" note.
badge string — Short pill text, e.g. "New".
disabled boolean false Uses aria-disabled, so the control stays focusable and can explain itself.
disabledReason string — Announced when a disabled control is focused.
loading boolean false Spinner replaces the leading icon; the label and width stay put.
count number — Click count shown beside the label.
rel string — Extra rel tokens, e.g. "sponsored nofollow".
brand string — Service slug, e.g. "spotify". Supplies the mark and, with brandStyle, the colour.
brandStyle string "mark" How much of the service's identity to spend. mark is monochrome and changes nothing.
One of: mark, tint, outline, solid
size string "md" Control size.
One of: sm, md, lg
block boolean true Full width.
variant string "secondary" Visual treatment. All variants share one behaviour and one API.
One of: secondary, ghost

Accessibility

  • Links navigate and buttons act: anything with an href renders as an anchor.
  • New-tab links carry a visually hidden note rather than relying on an icon to warn.
  • Loading locks the width and keeps the label, so the accessible name never changes mid-action.

Design tokens

--lb-surface --lb-outline-strong --lb-scrim

Navigation

Start here

Foundations

Components

See it

On this page