Library grid

One layer of the Library as a grid of cards, each with a live thumbnail rendered by the element's own module, its name, lifecycle, matrix score and purpose.

Organism · stable · v1.0.0 · owner: Site system lead · contract 19 of 20 points (open: figma)

Do and don't

Do: Atoms

Rendered by library-grid.ts

Open example: Library grid · Do: Atoms Use the full-page example to follow page links.

A layer as cards.

Do: Without thumbnails

Rendered by library-grid.ts

Open example: Library grid · Do: Without thumbnails Use the full-page example to follow page links.

Page declarations have no rendering of their own.

Don't: An empty layer

Rendered by library-grid.ts

Renders nothing for these props (by design).

Renders nothing; never an empty heading.

Don't: Numbered layers

Rendered by library-grid.ts

Renders nothing for these props (by design).

Numbering is kept for the job sequence (D-SITE-006).

Rules

RuleWhyCheck
A thumbnail is the element's own first do example, rendered by its module.A screenshot could drift from the code; the module cannot.Automated: scripts/site/system/library.ts (writes each thumbnail from the element's render function)

API

PropTypeRequiredDefaultWhat it does
idstringYesThe layer id, used as the section anchor.
titlestringYesThe layer name.
countnumberYesHow many elements the layer has.
cardslistYesOne card per element: name, href, meta line, purpose and an optional thumbnail URL.

Contract details

The full contract: identity, anatomy, variants, states, tokens, layout, motion, accessibility, content, tests

Identity

AspectValue
Idlibrary-grid
LayerOrganisms
Categorylibrary
OwnerSite system lead
Statusstable
Version1.0.0
Sourceapps/showcase/site/system/organisms/library-grid.ts (private repository; the contract and the render function are this one module)
VersionDateChange
1.0.02026-10-26Library grid as one module: its markup moved out of the page builder (scripts/site) into the system.

Use when

  • On the Library index, once per layer. Why: A reader recognises an element by sight before reading its contract.

Do not use when

  • For pages of the site. Why: Site pages use Tile and Rows list; this grid documents the system.

Anatomy

PartWhat it is
rootsection.lib-layer named by its h2
gridul.lib-grid
cardli.lib-card: thumbnail, link, meta and purpose
thumbdiv.lib-thumb.is-s|m|l (inert): an iframe of the element's first do example on a cotton stage (body.lib-stage), scaled by layer
moredetails.lib-more: the rest of a layer after six cards

Made of: heading, text-link.

Used in: pages directly.

Variants

VariantWhenWhy
defaultWherever the page declaration places it.One shape per job keeps pages predictable.

States

StateRendered or not applicable
defaultdefault
hoverNot applicable: The library grid is not interactive, so it has no hover state.
focus-visibleNot applicable: The library grid does not take focus; links and buttons inside it carry their own focus ring.
activeNot applicable: The library grid cannot be pressed.
disabledNot applicable: The library grid has nothing to disable.
loadingNot applicable: The library grid is rendered at build time and is complete when the page loads.
emptyNot applicable: The library grid is not rendered without content; the builder skips it.
errorNot applicable: The library grid shows no data that can fail.
currentNot applicable: The library grid has no current item.
visitedNot applicable: The library grid is not a link.
expandedWhen more than six cards are supplied, native details.lib-more opens the remaining cards through its summary. Enter or Space toggles it; the same disclosure works without JavaScript.

Tokens

PartToken
card.ground--surface
card.rule--rule (top) in --ink
thumb.ground--cotton
meta.font--type-label
gap--space-6
--library-grid-margin-block-space-9var(--space-9)
--library-grid-gap-space-4var(--space-4)
--library-grid-gap-space-6var(--space-6)
--library-grid-gap-space-3var(--space-3)
--library-grid-padding-space-5var(--space-5)
--library-grid-background-surfacevar(--surface)
--library-grid-border-block-start-rulevar(--rule)
--library-grid-border-block-start-inkvar(--ink)
--library-grid-font-type-h3var(--type-h3)
--library-grid-color-inkvar(--ink)
--library-grid-font-type-smallvar(--type-small)
--library-grid-color-ink-2var(--ink-2)
--library-grid-font-type-labelvar(--type-label)
--library-grid-background-cottonvar(--cotton)
--library-grid-border-rule-hairvar(--rule-hair)
--library-grid-border-linevar(--line)
--library-grid-padding-space-9var(--space-9)
--library-grid-margin-block-start-space-6var(--space-6)
--library-grid-font-type-small-strongvar(--type-small-strong)
--library-grid-padding-block-space-4var(--space-4)
--library-grid-gap-space-5var(--space-5)

Layout

AspectValue
breakpointsChecked at 390, 768, 1024 and 1440 px; one column under 600 px, then auto-fill columns of at least 260 px.
wrappingText wraps; nothing scrolls sideways.
textExpansionJapanese runs 20 to 40% longer; headings break between phrases (jaBreaks) and blocks grow downwards.

Spacing and rhythm

AspectValue
internal--space-4 inside a card; --space-6 between cards.
external--space-9 between layers.
rhythmOne grid per layer, in atomic order.

Motion

AspectValue
NoneNo intrinsic element animation. The optional claude-entrance consumer profile may translate below-fold structure once (20px, --dur-weave, --ease-enter, --stagger); reduced motion disables it. This preserved baseline entrance is separate from element playback.

Runtime and reuse

  1. Render-only element; mount any registered child enhancements separately. Preserve required Site CSS, fonts, responsive and locale rules from nativeElement.

Accessibility passport

AspectValue
roleregion (section) with a list of cards
nameIts h2
keyboardOne link per card; the thumbnail is inert, so it takes no focus.
focusThe --focus ring on each card's link.
screenReaderReads the name, the meta line and the purpose; the thumbnail is inert and hidden from the accessibility tree.
contrastInk on cotton 14:1; text on every dye field 4.5:1 or better (checked by check-brand).
targetLinks and buttons are 44 px tall.

Content

SlotLengthVoice
purpose1 sentenceWhat the element is for

Good: “Marks the reader's next step.”

Bad: “A reusable button component.”

Japanese: The Library is English only.

Icons and illustrations

None: this element uses no icon or illustration of its own.

Decisions and exceptions

Usage

501 uses across the built pages (measured by npm run site:system).

Tests

AspectValue
unittests/unit/site-system.test.ts: renders every do and don't example through the registry and checks the classes it owns
visualNot yet: there are no screenshot baselines; the Library page is checked for sideways scroll at 1440 px by tests/site/system.spec.ts
a11ytests/site/system.spec.ts: axe (0 serious or critical) on the element's Library page in light and dark
parityscripts/site/system/check.ts: Library examples are rendered by the same render function the site imports

Figma

not-yet: The Loom Site Figma library is the last stage of the plan; this element is not mapped yet.

Open in Storybook

Start with a conversation about your system.

We read your system, show you what we found, and agree with your team what to fix first.