Atom · beta · v1.0.0 · owner: Site system lead · contract 19 of 20 points (open: figma)
Do and don't
Do: After a call to action
Rendered by icon.tsOpen example: Icon · Do: After a call to action Use the full-page example to follow page links.
Do: Labelled when it stands alone
Rendered by icon.tsOpen example: Icon · Do: Labelled when it stands alone Use the full-page example to follow page links.
Don't: A lone arrow as the only content of a link
Rendered by icon.tsOpen example: Icon · Don't: A lone arrow as the only content of a link Use the full-page example to follow page links.
Don't: An unknown name
Rendered by icon.tsRefused by the element. icon: "sparkle" is not in the Loom Site icon set
Rules
| Rule | Why | Check |
|---|---|---|
| Draw only icons from the Loom Site set. | One governed set keeps stroke, grid and meaning the same on every page. | Automated: scripts/site/system/check.ts (icon names in examples and pages) |
| An icon without a label is aria-hidden. | Next to words it repeats them; hidden, it never adds noise to a screen reader. | Automated: tests/unit/site-system.test.ts |
| Icons stroke with currentColor. | They then follow the text role and the dark mode with no extra token. | Automated: tests/unit/site-system.test.ts |
API
| Prop | Type | Required | Default | What it does |
|---|---|---|---|---|
name | arrow-right | Yes | Which icon from the set. | |
label | string | No | Accessible name when the icon stands alone; omitted icons are hidden from assistive technology. | |
className | string | No | "arrow" | The class the parent animates (the arrow nudges on hover). |
Contract details
The full contract: identity, anatomy, variants, states, tokens, layout, motion, accessibility, content, tests
Identity
| Aspect | Value |
|---|---|
| Id | icon |
| Layer | Atoms |
| Category | media |
| Owner | Site system lead |
| Status | beta |
| Version | 1.0.0 |
| Source | apps/showcase/site/system/atoms/icon.ts (private repository; the contract and the render function are this one module) |
| Version | Date | Change |
|---|---|---|
| 1.0.0 | 2026-10-26 | The arrow that leads every call to action, drawn once for the whole site. |
Use when
- An action or link needs a direction cue, such as the arrow after a call to action. Why: The arrow tells the reader the link moves them forward, without adding words.
- A small symbol repeats across the site and must look the same everywhere. Why: One drawing in one place cannot drift between pages.
Do not use when
- The icon would be the only label of a control. Why: An icon alone is ambiguous; every control needs a text name.
- As decoration in running text. Why: Decorative symbols slow reading and add nothing a word cannot say.
Anatomy
| Part | What it is |
|---|---|
| root | An inline svg with class arrow (or the given class), aria-hidden unless labelled. |
| path | The stroked path on the 16 or 24 px grid. |
Made of: tokens:colour.
Used in: arrow-link, button, header, jobs-strip, rows-list.
Variants
| Variant | When | Why |
|---|---|---|
| decorative | Next to words that already name the action. | Screen readers would otherwise read the symbol twice. |
| labelled | The icon carries meaning the words do not. | Assistive technology then announces the label. |
States
| State | Rendered or not applicable |
|---|---|
| default | default |
| hover | Not applicable: An icon is not interactive, so it has no hover state. |
| focus-visible | Not applicable: An icon does not take focus; links and buttons inside it carry their own focus ring. |
| active | Not applicable: An icon cannot be pressed. |
| disabled | Not applicable: An icon has nothing to disable. |
| loading | Not applicable: An icon is rendered at build time and is complete when the page loads. |
| empty | Not applicable: An icon is not rendered without content; the builder skips it. |
| error | Not applicable: An icon shows no data that can fail. |
| current | Not applicable: An icon has no current item. |
| visited | Not applicable: An icon is not a link. |
| expanded | Not applicable: An icon does not open or close. |
Tokens
| Part | Token |
|---|---|
| root.stroke | currentColor (inherits the text role of its parent) |
| root.size | 1em, set by the parent's type role |
Layout
| Aspect | Value |
|---|---|
| min | 16 px |
| max | 24 px |
| breakpoints | Required review at 390, 768, 1024 and 1440 px; execution is not implied by this declaration; the icon scales with the text it sits in. |
| wrapping | Never wraps; flex: none in buttons and links. |
| textExpansion | Not affected: icons carry no text. |
Spacing and rhythm
| Aspect | Value |
|---|---|
| internal | None: the drawing's own 2 px padding inside its box. |
| external | The parent's gap (--space-4 in buttons). |
| rhythm | Not a section element. |
Motion
| Aspect | Value |
|---|---|
| None | The icon does not move by itself; the arrow's nudge on hover belongs to the button and arrow link. |
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 | img when labelled, otherwise presentation (aria-hidden) |
| name | The label prop, or none when decorative |
| keyboard | Not focusable (focusable=false). |
| focus | Never in the focus order. |
| screenReader | Decorative icons are silent; labelled icons read their label once. |
| contrast | Inherits the text colour, so it meets the same 4.5:1 as its text. |
| target | Not a target; the parent link or button is. |
Content
| Slot | Length | Voice |
|---|---|---|
| label | 3 words | Plain verb or noun, as the action says it |
Good: “Book a conversation →”
Bad: “→ alone as a button”
Japanese: The label prop is translated with the page; decorative icons need no Japanese.
Icons and illustrations
-
icon:arrow-right
Decisions and exceptions
- D-SITE-001: Loom Site is the site's own design system, governed by Loom
- D-SITE-010: One governed icon set
Usage
511 uses across the built pages (measured by npm run site:system).
Shared styles
SVG stroke inherits currentColor and size is 1em; the parent action owns spacing and hover motion. No independent palette alias is needed.
Style owners: arrow-link, button
apps/showcase/site/system/styles/core/arrow-link.cssapps/showcase/site/system/styles/core/button.css
Remaining review: Standalone labelled/decorative and parent-action state review remains required.
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.