Components

Interactive

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

Interactive

Comments

A read-only thread with an optional reply form.

commentsdefaultloadingemptysuccess

Preview

Thread

Usage

Props

PropTypeDefaultDescription
title string "Comments" Section heading.
items array [] [{ author, avatar?, date, text, replies? }]
allowReply boolean false Shows a reply form beneath the thread.
replyLabel string "Add a comment" Label for the reply field.
loading boolean false Renders the skeleton state, preserving the final layout exactly so nothing shifts on resolve.
moderated boolean true States that new comments are reviewed before appearing.

Accessibility

  • Each comment is an <article> with its author and time in the accessible name, so the thread can be navigated item by item.
  • Replies are nested lists, so depth is conveyed structurally rather than by indentation alone.

Design tokens

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

Interactive

FAQ

Questions and answers as an accordion, with real headings so the list is navigable.

faqdefaultexpandedempty

Preview

Three questions

Usage

Props

PropTypeDefaultDescription
title string — Section heading.
items array [] [{ question, answer }]
single boolean false Only one answer open at a time.
variant string "flush" Visual treatment. All variants share one behaviour and one API.
One of: bordered, flush
headingLevel number 3 2–6.
schema boolean true Emits FAQPage JSON-LD so the answers can appear in search results.

Accessibility

  • Each question is a button inside a heading, so a screen reader can jump question to question.
  • Answers stay in the accessible tree while collapsed, and find-in-page opens the panel that contains a match.

Design tokens

--lb-outline --lb-scrim --lb-dur-normal

Interactive

Poll

One question, a few options, and the results once someone has voted.

polldefaultvotedresultsclosedempty

Preview

Open poll

Usage

Props

PropTypeDefaultDescription
questionrequired string — What is being asked.
options array [] [{ id, label, votes }]
showResults boolean false Reveal results before voting.
totalLabel string "votes" Unit word for the total.
closed boolean false Shows results only, with a closed note.
thanks string "Thanks — your vote is counted." Confirmation after voting.

Accessibility

  • Options are a radio group with one tab stop and arrow-key selection, not a row of independent buttons.
  • Result bars are decorative — every percentage is also written out, and the chosen option is marked in text.
  • The confirmation is announced politely once, rather than re-announcing every bar as it animates.

Design tokens

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

Interactive

Rating

A star score, either read-only or collectable.

ratingdefaulthoverfocusselected

Preview

Read only
Collectable

Usage

Props

PropTypeDefaultDescription
value number 0 Current score, in half steps.
max number 5 How many stars.
count number — How many people have rated.
readonly boolean true Read-only display versus a collectable rating.
label string "Rating" Accessible name for the control.
size string "md" Control size.
One of: sm, md

Accessibility

  • Read-only ratings are a single labelled element announcing "4.5 out of 5", never five separate glyphs.
  • A collectable rating is a radio group: one tab stop, arrow keys to change, and the value announced as it moves.

Design tokens

--lb-on-surface --lb-on-surface-3

Interactive

Survey

A short set of questions with one submit, validated only when it is sent.

surveydefaultinvalidloadingsuccessempty

Preview

Two questions

Usage

Props

PropTypeDefaultDescription
title string "Quick survey" Heading.
description string — Why you are asking.
questions array [] [{ id, label, type: 'text'|'choice'|'scale', options?, required? }]
submitLabel string "Send answers" Button text.
action string — Form POST endpoint. Without it the kit emits lb:submit.
successTitle string "Thank you" Confirmation heading.

Accessibility

  • Validation runs on submit; focus moves to the first invalid field and a role="alert" summary lists what is missing.
  • Every field has a visible label, and choice groups are fieldsets with a legend rather than loose radios.

Design tokens

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

Interactive

Tabs

Switch between panels of links or content without leaving the page.

tabsdefaultselectedfocusempty

Preview

Two tabs

Usage

Props

PropTypeDefaultDescription
items array [] [{ label, blocks: [] }] where blocks are component configs.
selected number 0 Index of the tab open on first paint.
label string "Sections" Accessible name for the tab list.
manual boolean false Arrow keys move focus without selecting; Enter or Space selects.

Accessibility

  • The APG tab pattern in full: one tab stop for the list, arrow keys to move, Home and End to jump, and aria-controls binding each tab to its panel.
  • Automatic activation is the default because panels are cheap here; set manual when a panel would fetch on selection.

Design tokens

--lb-surface-2 --lb-surface --lb-outline --lb-r-md

Interactive

Testimonials

What other people say, as a stack or a swipeable row.

testimonialsdefaultloadingempty

Preview

Two quotes

Usage

Props

PropTypeDefaultDescription
title string — Section heading.
items array [] [{ text, author, role?, avatar?, rating? }]
layout string "stack" How the children are arranged.
One of: stack, scroller, grid
loading boolean false Renders the skeleton state, preserving the final layout exactly so nothing shifts on resolve.

Accessibility

  • Each quote is a figure with a real <cite>, so the attribution belongs to the quotation rather than following it by chance.
  • The scroller is keyboard scrollable and labelled, because a scrollable region must be reachable without a pointer.

Design tokens

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

Interactive

Timeline

An ordered sequence of moments, where the order carries the meaning.

timelinedefaultcurrentloadingempty

Preview

Archive history

Usage

Props

PropTypeDefaultDescription
title string — Section heading.
items array [] [{ date, title, description?, href?, current? }]
reverse boolean false Newest first.
loading boolean false Renders the skeleton state, preserving the final layout exactly so nothing shifts on resolve.

Accessibility

  • An ordered list, because sequence is the information — not a set of divs joined by a drawn line.
  • The current entry is marked in text as well as by its filled node, so the marker is not shape alone.

Design tokens

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

Navigation

Start here

Foundations

Components

See it

On this page