Template · stable · v1.0.0 · owner: Site system lead · contract 19 of 20 points (open: figma)
Do and don't
Do: Saffron call to action
Rendered by dye-field.tsOpen example: Dye field · Do: Saffron call to action Use the full-page example to follow page links.
Do: Ink founder field
Rendered by dye-field.tsOpen example: Dye field · Do: Ink founder field Use the full-page example to follow page links.
Don't: A red field for an error
Rendered by dye-field.tsOpen example: Dye field · Don't: A red field for an error Use the full-page example to follow page links.
Don't: Two fields touching
Rendered by dye-field.tsOpen example: Dye field · Don't: Two fields touching Use the full-page example to follow page links.
Rules
| Rule | Why | Check |
|---|---|---|
| A dye or ink field is always followed by cotton; two fields never touch. The four-jobs band is one template (a grid of dye tiles inside the hero), so it counts as one field. | Adjacent fields blur into one block and the page loses its rhythm; the tiles of one band are one piece of structure, not four sections. | Automated: scripts/site/system/check-pages.ts (adjacent fields) |
| Text on a field uses the field's own tokens. | Each field's text colour is chosen for 4.5:1 or better. | Automated: npm run site:brand (check-brand contrast) |
API
| Prop | Type | Required | Default | What it does |
|---|---|---|---|---|
colour | indigo | madder | saffron | teal | ink | quiet | Yes | The field's colour. | |
html | html | Yes | What stands on the field. | |
tag | div | section | No | "div" | The wrapping element. |
Contract details
The full contract: identity, anatomy, variants, states, tokens, layout, motion, accessibility, content, tests
Identity
| Aspect | Value |
|---|---|
| Id | dye-field |
| Layer | Templates |
| Category | ground |
| Owner | Site system lead |
| Status | stable |
| Version | 1.0.0 |
| Source | apps/showcase/site/system/templates/dye-field.ts (private repository; the contract and the render function are this one module) |
| Version | Date | Change |
|---|---|---|
| 1.0.0 | 2026-10-26 | Dye field as one module: its markup moved out of the page builder (scripts/site) into the system. |
Use when
- The hero, page heads, the lead, the founder and the call to action. Why: Colour as structure: a field tells the reader a new part of the argument starts (D-SITE-004).
Do not use when
- Directly after another field. Why: Two fields touching read as one muddy block; a field is always followed by cotton (D-SITE-002).
- To show a state. Why: States are small marks with their word, never a field.
Anatomy
| Part | What it is |
|---|---|
| root | Any block with the field-<colour> class |
| text | Text inside uses the field's own --field-fg and --field-fg-2 tokens |
Made of: tokens:colour.
Used in: library-overview, roles-grid, tile, cta-section, founder-section, hero, lead-section, page-head, persona-strip.
Variants
| Variant | When | Why |
|---|---|---|
| indigo | The hero and Product pages. | Indigo is the brand's lead colour. |
| madder | Solutions and roles; the 404. | A warm field for people and problems. |
| saffron | The call to action and Demos. | The one action colour: the reader learns saffron means 'do this'. |
| teal | The UX Ops lead, Resources and articles. | The calm field for learning. |
| ink | The founder and Company. | The quiet authority of ink for who we are. |
| quiet | The persona strip. | A tinted band that is not a dye, so it may sit near a field. |
States
| State | Rendered or not applicable |
|---|---|
| default | default |
| hover | Not applicable: The dye field is not interactive, so it has no hover state. |
| focus-visible | Not applicable: The dye field does not take focus; links and buttons inside it carry their own focus ring. |
| active | Not applicable: The dye field cannot be pressed. |
| disabled | Not applicable: The dye field has nothing to disable. |
| loading | Not applicable: The dye field is rendered at build time and is complete when the page loads. |
| empty | Not applicable: The dye field is not rendered without content; the builder skips it. |
| error | Not applicable: The dye field shows no data that can fail. |
| current | Not applicable: The dye field has no current item. |
| visited | Not applicable: The dye field is not a link. |
| expanded | Not applicable: The dye field does not open or close. |
Tokens
| Part | Token |
|---|---|
| root.background | --field-bg (from the dye's primitive) |
| text.color | --field-fg; secondary --field-fg-2 |
| link.color | --field-link |
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 | Set by the template that uses it. |
| external | Full bleed: no margin. |
| rhythm | Field, then cotton (D-SITE-002). |
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 | region (section) named by its heading |
| name | Its h2, by aria-labelledby |
| keyboard | Links and buttons inside, in reading order. |
| focus | The --focus ring on every link and button inside. |
| screenReader | Read in source order; decorative weaving is aria-hidden. |
| 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 |
|---|---|---|
| html | As the template | As the template |
Good: “The hero on indigo”
Bad: “A status shown as a red field”
Japanese: No text of its own.
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-004: Colour as structure, marks as state
- D-SITE-014: Base tokens are the single source of truth for the palette
Usage
496 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.