Components
Interactive
9 components. Every one is themeable, keyboard operable, and configurable by data attribute, JSON or JavaScript.
Interactive
Carousel
A swipeable row of cards with explicit previous and next controls.
carouseldefaultfocusempty
Preview
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
items |
array |
[] |
Component configs, each rendered as a slide. |
label |
string |
"Carousel" |
Accessible name for the region. |
peek |
boolean |
true |
Show a sliver of the next slide, so the row reads as scrollable. |
controls |
boolean |
true |
Show previous and next buttons. |
Accessibility
- Scrolling is native, so it works with a trackpad, a touchscreen and the keyboard — nothing here requires a drag (WCAG 2.5.7).
- The track is a labelled, focusable region, and the previous/next buttons disable themselves at the ends rather than looping silently.
- Nothing auto-advances: a carousel that moves on its own takes control away from the reader.
Design tokens
--lb-surface --lb-outline --lb-s-3
Interactive
Comments
A read-only thread with an optional reply form.
commentsdefaultloadingemptysuccess
Preview
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
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
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
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
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
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
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
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
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
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
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
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
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
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
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
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