Components

Content

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

Content

Apple Music Embed

An Apple Music album, playlist or song, behind a click-to-load facade.

apple-music-embeddefaultplaying

Preview

Album

Usage

Props

PropTypeDefaultDescription
hrefrequired string — An music.apple.com URL.
titlerequired string — What is being embedded.
poster string — Cover image for the facade.
ratio string "16 / 9" CSS aspect-ratio.
brandStyle string "tint" How much of Apple Music's identity the facade spends.
One of: mark, tint, solid

Accessibility

  • The facade names the release, so a keyboard user knows what will load before it does.
  • Loading is user-initiated, which keeps the page's first paint free of a third-party player.

Design tokens

--lb-r-md --lb-surface-3

Content

Audio Player

A self-hosted track with custom transport, a scrub bar and a time readout.

audio-playerdefaultplayingloadingerror

Preview

Track

Usage

Props

PropTypeDefaultDescription
srcrequired string — Audio file URL.
titlerequired string — Track title.
artist string — Who made it.
artwork string — Cover image URL.
duration string — Displayed before metadata loads, e.g. "3:24".
downloadHref string — Adds a download action.
transcript string — Link to a transcript. Strongly recommended for speech.

Accessibility

  • The scrub bar is a real range input, so it is arrow-key operable and announces its position as a percentage of the track.
  • Play/pause is one button whose accessible name changes with state, rather than two controls where one is always dead.
  • Time is announced on demand rather than continuously, so a screen reader is not flooded once a second.

Design tokens

--lb-surface --lb-outline --lb-primary --lb-surface-3

Content

Code Snippet

A code block with a filename, a language badge, a copy control and seven-role syntax colour.

code-snippetdefaultcopiedfocus

Preview

JavaScript

Usage

Props

PropTypeDefaultDescription
coderequired string — The source to display.
language string "text" An unrecognised language degrades to plain ink rather than being coloured approximately.
One of: text, html, css, js, json, bash, yaml
filename string — Shown in the toolbar.
lineNumbers boolean false Adds a gutter that is excluded from copied text.
copyable boolean true Shows the copy control.
label string — Accessible name for the scrollable region.

Accessibility

  • The <pre> takes tabindex="0" and a label, because a horizontally scrollable region must be reachable from the keyboard.
  • Copy confirms through the polite live region and swaps the glyph for 1.6 seconds — two channels, not colour alone.
  • Line numbers are user-select: none, so copied code stays clean.

Design tokens

--lb-code-surface --lb-code-keyword --lb-code-string --lb-code-comment

Content

File Downloads

A list of files with their type and weight stated up front.

file-downloadsdefaultloadingempty

Preview

Downloads

Usage

Props

PropTypeDefaultDescription
title string — Section heading.
items array [] [{ label, href, type, size, description? }]
loading boolean false Renders the skeleton state, preserving the final layout exactly so nothing shifts on resolve.
note string — A line under the list, e.g. licence terms.

Accessibility

  • Type and size are part of the link's accessible name, which is what lets someone decide before they commit the bandwidth.
  • The download attribute is set, so the file saves rather than replacing the page.

Design tokens

--lb-outline-soft --lb-surface

Content

Markdown Block

Prose with a safe Markdown subset: headings, lists, quotes, links, emphasis and inline code.

markdown-blockdefaultempty

Preview

Prose

Usage

Props

PropTypeDefaultDescription
textrequired string — Markdown source.
size string "sm" Control size.
One of: sm, md
headingLevel number 3 The level a top-level # maps to.

Accessibility

  • Every string is escaped before parsing, so no caller content can inject markup the kit did not author — this is a renderer, not an HTML passthrough.
  • Prose is capped at the measure so lines stay readable however wide the container gets.

Design tokens

--lb-measure --lb-type-body-sm --lb-outline-strong

Content

PDF Preview

A document with its size and page count, and an honest download action.

pdf-previewdefaulthoverfocus

Preview

Press kit

Usage

Props

PropTypeDefaultDescription
titlerequired string — Document title.
hrefrequired string — The PDF URL.
pages number — Page count.
size string — File size, e.g. "2.4 MB".
thumbnail string — First-page image.
description string — What the document contains.
updated string — ISO date of the last revision.

Accessibility

  • The file type and size are in the link text, not hidden in an icon, so nobody downloads 40 MB on a phone by accident.
  • The thumbnail is decorative — the title and description carry the content.

Design tokens

--lb-surface --lb-outline --lb-r-lg

Content

Podcast Player

One episode with its number, date and length, plus where else to listen.

podcast-playerdefaultplayingempty

Preview

Episode

Usage

Props

PropTypeDefaultDescription
titlerequired string — Episode title.
show string — Programme name.
episode number — Episode number.
src string — Audio file URL for the inline player.
date string — ISO publication date.
duration string — e.g. "48 min".
artwork string — Cover image URL.
summary string — Two lines about the episode.
platforms array [] [{ platform, href }] — where else to listen.
transcript string — Link to a transcript.
brandStyle string "tint" How much of each platform's identity the "also on" pills spend.
One of: mark, tint, outline, solid

Accessibility

  • The episode number and date are in the heading region, not visual-only decoration, so the item is identifiable out of context.
  • A transcript link is offered wherever speech is — it serves far more people than captions alone.

Design tokens

--lb-surface --lb-outline --lb-r-lg

Content

Quote Block

A pulled quotation with its attribution and source.

quote-blockdefault

Preview

With attribution

Usage

Props

PropTypeDefaultDescription
textrequired string — The quotation.
author string — Who said it.
role string — Their title or publication.
href string — Link to the source.
avatar string — Portrait of the author.
variant string "rule" Visual treatment. All variants share one behaviour and one API.
One of: rule, card

Accessibility

  • A real <blockquote> with <cite> — the attribution is bound to the quotation rather than being a paragraph that happens to sit beneath it.
  • The quotation mark glyph is decorative and hidden, so it is not announced as punctuation noise.

Design tokens

--lb-outline-strong --lb-type-body --lb-on-surface-2

Content

Spotify Embed

A Spotify track, album, playlist, show or episode, behind a click-to-load facade.

spotify-embeddefaultplaying

Preview

Album

Usage

Props

PropTypeDefaultDescription
urirequired string — A Spotify URL or URI, e.g. spotify:album:xyz.
titlerequired string — What is being embedded.
poster string — Cover image for the facade.
compact boolean false 152px tall single-track player rather than the full card.
brandStyle string "tint" How much of Spotify's identity the facade spends.
One of: mark, tint, solid

Accessibility

  • Nothing loads until someone activates the facade, so no third-party script runs and no cookie is set on arrival.
  • The iframe carries a real title naming the release rather than "Spotify Embed".

Design tokens

--lb-r-md --lb-surface-3

Content

Video Embed

A self-hosted or third-party video, loaded only when someone asks for it.

video-embeddefaultplayingempty

Preview

Third party

Usage

Props

PropTypeDefaultDescription
srcrequired string — Video file URL, or an iframe embed URL when provider is set.
titlerequired string — What the video is. Used as the iframe title.
provider string — Vimeo, Loom, etc. Set this to use the click-to-load facade.
poster string — Poster image URL.
ratio string "16 / 9" CSS aspect-ratio.
captions string — WebVTT track URL for a self-hosted video.
captionsLang string "en" BCP 47 tag for the captions track.

Accessibility

  • A self-hosted video uses native controls, which are already keyboard operable and screen-reader labelled.
  • Captions are a first-class prop, not an afterthought — supply a VTT track for any video with speech.
  • Nothing autoplays, so no one loses control of their own speakers.

Design tokens

--lb-r-md --lb-surface-3

Content

YouTube Embed

A YouTube video behind a click-to-load facade, using the no-cookie domain.

youtube-embeddefaultplaying

Preview

Facade

Usage

Props

PropTypeDefaultDescription
idrequired string — The 11-character video ID.
titlerequired string — The video's title.
poster string — Override the thumbnail. Defaults to YouTube's own.
start number — Start offset in seconds.
ratio string "16 / 9" CSS aspect-ratio.
brandStyle string "tint" How much of YouTube's identity the facade spends.
One of: mark, tint, solid

Accessibility

  • The facade is a real button naming the video, so it is reachable and its purpose is clear before anything loads.
  • Focus moves into the player after the swap rather than being stranded on a removed button.

Design tokens

--lb-r-md --lb-overlay

Navigation

Start here

Foundations

Components

See it

On this page