Organism · stable · v1.0.0 · owner: Site system lead · contract 19 of 20 points (open: figma)
Do and don't
Do: The overview
Rendered by library-overview.tsOpen example: Library overview · Do: The overview Use the full-page example to follow page links.
Do: Dyes only
Rendered by library-overview.tsOpen example: Library overview · Do: Dyes only Use the full-page example to follow page links.
Don't: Hand-picked hex swatches
Rendered by library-overview.tsRenders nothing for these props (by design).
Don't: A seventh size
Rendered by library-overview.tsOpen example: Library overview · Don't: A seventh size Use the full-page example to follow page links.
Rules
| Rule | Why | Check |
|---|---|---|
| Every specimen is drawn by a token class, never by an inline value. | A specimen that used its own value could drift from the system it documents. | Automated: scripts/site/check-brand.ts (no raw values) and the no-inline-style gate |
API
| Prop | Type | Required | Default | What it does |
|---|---|---|---|---|
dyes | list | Yes | The dye fields: colour, name, token and role (from brand.ts). | |
sizes | list | Yes | The six sizes: size, token and use (from brand.ts). | |
spaces | list | Yes | The spacing steps: step, token and pixel value (from the generated tokens). |
Contract details
The full contract: identity, anatomy, variants, states, tokens, layout, motion, accessibility, content, tests
Identity
| Aspect | Value |
|---|---|
| Id | library-overview |
| Layer | Organisms |
| Category | library |
| Owner | Site system lead |
| Status | stable |
| Version | 1.0.0 |
| Source | apps/showcase/site/system/organisms/library-overview.ts (private repository; the contract and the render function are this one module) |
| Version | Date | Change |
|---|---|---|
| 1.0.0 | 2026-10-26 | Library overview as one module: its markup moved out of the page builder (scripts/site) into the system. |
Use when
- At the top of the Library index (/system/). Why: A design-system lead judges a system by its specimens first, then by its tables.
Do not use when
- On marketing pages. Why: The overview documents the system; a page sells by showing the product working.
Anatomy
| Part | What it is |
|---|---|
| dyes | ul.lib-dyes: one dye field per colour, with its name, token and role |
| edges | div.lib-edges: a field joined to cotton by the woven edge, in the saffron and the ink thread |
| ramp | ol.lib-ramp: each of the six sizes set in its own size |
| spaces | ol.lib-spaces: each step of the scale as a bar of its own width |
Made of: dye-field, woven-edge, colour, type, spacing.
Used in: pages directly.
Variants
| Variant | When | Why |
|---|---|---|
| default | Wherever the page declaration places it. | One shape per job keeps pages predictable. |
States
| State | Rendered or not applicable |
|---|---|
| default | default |
| hover | Not applicable: The library overview is not interactive, so it has no hover state. |
| focus-visible | Not applicable: The library overview does not take focus; links and buttons inside it carry their own focus ring. |
| active | Not applicable: The library overview cannot be pressed. |
| disabled | Not applicable: The library overview has nothing to disable. |
| loading | Not applicable: The library overview is rendered at build time and is complete when the page loads. |
| empty | Not applicable: The library overview is not rendered without content; the builder skips it. |
| error | Not applicable: The library overview shows no data that can fail. |
| current | Not applicable: The library overview has no current item. |
| visited | Not applicable: The library overview is not a link. |
| expanded | Not applicable: The library overview does not open or close. |
Tokens
| Part | Token |
|---|---|
| dye.ground | --field-bg via .field-<colour> |
| ramp.size | --fs-display … --fs-label |
| space.bar | --space-1 … --space-13 |
| space.bar.colour | --ink |
| label.font | --type-label |
| --library-overview-gap-space-9 | var(--space-9) |
| --library-overview-margin-block-space-7 | var(--space-7) |
| --library-overview-margin-block-space-9 | var(--space-9) |
| --library-overview-gap-space-5 | var(--space-5) |
| --library-overview-gap-space-3 | var(--space-3) |
| --library-overview-gap-space-2 | var(--space-2) |
| --library-overview-padding-space-5 | var(--space-5) |
| --library-overview-font-type-h3 | var(--type-h3) |
| --library-overview-font-type-label | var(--type-label) |
| --library-overview-font-type-small | var(--type-small) |
| --library-overview-padding-space-6 | var(--space-6) |
| --library-overview-gap-space-4 | var(--space-4) |
| --library-overview-gap-space-1 | var(--space-1) |
| --library-overview-padding-block-end-space-4 | var(--space-4) |
| --library-overview-border-block-end-rule-hair | var(--rule-hair) |
| --library-overview-border-block-end-line | var(--line) |
| --library-overview-color-ink-2 | var(--ink-2) |
| --library-overview-font-family-font-display | var(--font-display) |
| --library-overview-font-size-fs-display | var(--fs-display) |
| --library-overview-font-weight-weight-heavy | var(--weight-heavy) |
| --library-overview-font-size-fs-h2 | var(--fs-h2) |
| --library-overview-font-size-fs-h3 | var(--fs-h3) |
| --library-overview-font-weight-weight-strong | var(--weight-strong) |
| --library-overview-font-size-fs-body | var(--fs-body) |
| --library-overview-font-size-fs-small | var(--fs-small) |
| --library-overview-font-family-font-mono | var(--font-mono) |
| --library-overview-font-size-fs-label | var(--fs-label) |
| --library-overview-block-size-space-4 | var(--space-4) |
| --library-overview-background-ink | var(--ink) |
| --library-overview-inline-size-space-1 | var(--space-1) |
| --library-overview-inline-size-space-2 | var(--space-2) |
| --library-overview-inline-size-space-3 | var(--space-3) |
| --library-overview-inline-size-space-4 | var(--space-4) |
| --library-overview-inline-size-space-5 | var(--space-5) |
| --library-overview-inline-size-space-6 | var(--space-6) |
| --library-overview-inline-size-space-7 | var(--space-7) |
| --library-overview-inline-size-space-8 | var(--space-8) |
| --library-overview-inline-size-space-9 | var(--space-9) |
| --library-overview-inline-size-space-10 | var(--space-10) |
| --library-overview-inline-size-space-11 | var(--space-11) |
| --library-overview-inline-size-space-12 | var(--space-12) |
| --library-overview-inline-size-space-13 | var(--space-13) |
| --library-overview-color-field-fg-2 | var(--field-fg-2) |
Layout
| Aspect | Value |
|---|---|
| breakpoints | Required review at 390, 768, 1024 and 1440 px; execution is not implied by this declaration; columns stack under 768 px; the wrap keeps a 16 px gutter on phones. |
| wrapping | Text wraps; nothing scrolls sideways. |
| textExpansion | Japanese runs 20 to 40% longer; headings break between phrases (jaBreaks) and blocks grow downwards. |
Spacing and rhythm
| Aspect | Value |
|---|---|
| internal | --space-7 between groups; --space-4 inside a group. |
| external | Inside the Library's prose column, before the numbers. |
| rhythm | Dyes, edges, ramp, spacing: the order the brand book uses. |
Motion
| Aspect | Value |
|---|---|
| None | No 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
Render-only element; mount any registered child enhancements separately. Preserve required Site CSS, fonts, responsive and locale rules from nativeElement.
Accessibility passport
| Aspect | Value |
|---|---|
| role | lists of specimens, each named by its token |
| name | The group headings (h2) |
| keyboard | Links and buttons inside, in reading order. |
| focus | The --focus ring on every link and button inside. |
| screenReader | Each specimen reads its name, token and role or value; the bars and fields are not the only carrier of meaning. |
| contrast | Ink on cotton 14:1; text on every dye field 4.5:1 or better (checked by check-brand). |
| target | Links and buttons are 44 px tall. |
Content
| Slot | Length | Voice |
|---|---|---|
| role | 1 short sentence | What the colour is for |
Good: “Indigo: Product and See”
Bad: “Primary blue”
Japanese: The Library is English only; the overview has no Japanese strings.
Icons and illustrations
None: this element uses no icon or illustration of its own.
Decisions and exceptions
- D-SITE-002: A field is always followed by cotton; two fields never touch
- D-SITE-003: The woven edge sits at every field/cotton join, and nowhere else
- D-SITE-004: Colour as structure, marks as state
Usage
66 uses across the built pages (measured by npm run site:system).
Tests
| Aspect | Value |
|---|---|
| unit | tests/unit/site-system.test.ts: renders every do and don't example through the registry and checks the classes it owns |
| visual | Not yet: there are no screenshot baselines; the Library page is checked for sideways scroll at 1440 px by tests/site/system.spec.ts |
| a11y | tests/site/system.spec.ts: axe (0 serious or critical) on the element's Library page in light and dark |
| parity | scripts/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.