Components
Layout
10 components. Every one is themeable, keyboard operable, and configurable by data attribute, JSON or JavaScript.
Layout
Card
A bordered container for anything that belongs together.
carddefaulthoverfocus
Preview
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
title |
string |
— | Card heading. |
description |
string |
— | One line under the heading. |
headingLevel |
number |
3 |
2–6. |
padding |
string |
"md" |
One of: none, sm, md, lg |
interactive |
boolean |
false |
Adds the hover treatment. Only use when the whole card is a link. |
blocks |
array |
[] |
Child component configs, each { type, ...props }. |
Accessibility
- A card is a container, not a control: it gains hover and focus treatment only when something inside it is genuinely a link.
- Card titles never use h1 or h2, so a page of cards cannot outrank its own page title.
Design tokens
--lb-surface --lb-outline --lb-r-lg --lb-s-5
Layout
Container
The page column: a max width, centred, with the responsive gutter.
containerdefault
Preview
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
width |
string |
"page" |
page is the reading column, wide is a break-out. One of: page, wide, full |
gutter |
boolean |
true |
Apply the responsive inline padding. |
gap |
string |
— | Vertical rhythm between children. |
density |
string |
— | Scales spacing for this subtree only. One of: compact, comfortable, spacious |
blocks |
array |
[] |
Child component configs, each { type, ...props }. |
Accessibility
- Width caps are what keep line length inside the measure; prose never widens past it however wide the screen becomes.
- Density scales spacing only — never type below its token size, and never a target below 44px.
Design tokens
--lb-page --lb-wide --lb-gutter --lb-gutter-md
Layout
Floating CTA
A persistent action pinned to the bottom of the viewport, appearing after a scroll threshold.
floating-ctahiddenvisibledismissed
Preview
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
labelrequired |
string |
— | Action text. |
hrefrequired |
string |
— | Where the action goes. |
icon |
string |
— | Leading glyph. |
showAfter |
number |
400 |
Pixels scrolled before it appears. 0 shows it immediately. |
dismissible |
boolean |
true |
Adds a close control. |
note |
string |
— | A small line above the action. |
Accessibility
- It sits at the end of the DOM and never traps focus, so it cannot come between a reader and the content.
- Safe-area inset is respected, so on a phone the control clears the home indicator rather than sitting under it.
- Appearing is an opacity and transform change only, so it never shifts the layout beneath it.
Design tokens
--lb-elev-float --lb-z-float --lb-surface
Layout
Grid
An intrinsic grid that sizes against its container, not the window.
griddefaultempty
Preview
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
min |
string |
"200px" |
Minimum column width before the grid rewraps. |
gap |
string |
— | Override the gap. Defaults to the 4px scale. |
columns |
number |
— | Force a fixed column count instead of the intrinsic behaviour. |
blocks |
array |
[] |
Child component configs, each { type, ...props }. |
Accessibility
- Visual order follows DOM order, so a keyboard user meets the items in the order they are read.
- Sizing is intrinsic — repeat(auto-fit, minmax(min(N, 100%), 1fr)) — so the grid never overflows a narrow container.
Design tokens
--lb-s-3 --lb-s-6
Layout
Hero
The opening statement of a page: an image, a headline and one action.
herodefault
Preview
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
headlinerequired |
string |
— | The single most important sentence on the page. |
eyebrow |
string |
— | Small label above the headline. |
description |
string |
— | One or two supporting lines. |
image |
string |
— | Background or side image URL. |
imageAlt |
string |
"" |
Alt text; empty when the image is atmosphere rather than information. |
ctaLabel |
string |
— | Primary action text. |
ctaHref |
string |
— | Where the primary action goes. |
secondaryLabel |
string |
— | Secondary action text. |
secondaryHref |
string |
— | Where the secondary action goes. |
align |
string |
"center" |
Horizontal alignment of the block's content. One of: center, left |
headingLevel |
number |
1 |
1–3. Use 2 if the page already has an h1. |
Accessibility
- One h1 per page: the level is a prop so a hero can sit under an existing heading without breaking the outline.
- Two actions at most, and the secondary is visually quieter so the primary is unambiguous.
Design tokens
--lb-type-h1 --lb-s-8 --lb-r-lg
Layout
Masonry
A column layout for items of uneven height, such as a gallery.
masonrydefaultempty
Preview
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
columns |
number |
2 |
Columns at the widest size; one column below 480px. |
gap |
string |
— | Override the gap. |
blocks |
array |
[] |
Child component configs, each { type, ...props }. |
Accessibility
- Built on CSS columns, so reading order stays top-to-bottom within a column rather than jumping across the page.
- Because column flow can separate related items, this is for independent tiles only — never for a sequence where order matters.
Design tokens
--lb-s-3
Layout
Section
A titled region with its own heading level and vertical rhythm.
sectiondefaultempty
Preview
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
title |
string |
— | Section heading. |
description |
string |
— | One line under the heading. |
headingLevel |
number |
2 |
2–6, so the section sits correctly in the document outline. |
variant |
string |
"plain" |
Visual treatment. All variants share one behaviour and one API. One of: plain, ruled, eyebrow |
blocks |
array |
[] |
Child component configs, each { type, ...props }. |
Accessibility
- A real <section> bound to its heading with aria-labelledby, so it is reachable as a landmark.
- Heading level is explicit rather than guessed, which is what keeps levels from skipping.
Design tokens
--lb-s-7 --lb-outline --lb-type-mono-xs
Layout
Split Layout
Two panes side by side above a threshold, stacked below it.
split-layoutdefaultstacked
Preview
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
start |
array |
[] |
Blocks for the first pane. |
end |
array |
[] |
Blocks for the second pane. |
ratio |
string |
"1 / 1" |
Track ratio at the wide size, e.g. "2 / 1". Converted to fr units; a full grid-template-columns value is also accepted. |
threshold |
string |
"480px" |
Container width at which the split happens. |
gap |
string |
— | Override the gap. |
Accessibility
- The split responds to its own container rather than the viewport, so a pane inside a narrow column stacks even on a wide screen.
- DOM order is the reading order in both states: nothing is reordered visually away from how it is announced.
Design tokens
--lb-s-4 --lb-s-6
Layout
Stack
A vertical or horizontal run of children with one consistent gap.
stackdefaultempty
Preview
Usage
Props
| Prop | Type | Default | Description |
|---|---|---|---|
direction |
string |
"vertical" |
One of: vertical, horizontal |
gap |
string |
— | Any token or length. Defaults to the page rhythm. |
align |
string |
"stretch" |
Horizontal alignment of the block's content. One of: start, center, end, stretch |
justify |
string |
"start" |
One of: start, center, end, space-between |
wrap |
boolean |
true |
Allow horizontal stacks to wrap rather than overflow. |
blocks |
array |
[] |
Child component configs, each { type, ...props }. |
Accessibility
- A stack is presentational: it adds no roles and no landmarks, so it cannot disturb the document outline.
- Horizontal stacks wrap by default, which is what keeps a row of controls from overflowing a narrow screen.
Design tokens
--lb-s-2 --lb-s-3 --lb-s-4