Atom · stable · v1.0.0 · owner: Site system lead · contract 19 of 20 points (open: figma)
Do and don't
Do: Sample data in a figure head
Rendered by tag.tsOpen example: Tag · Do: Sample data in a figure head Use the full-page example to follow page links.
Do: A version
Rendered by tag.tsOpen example: Tag · Do: A version Use the full-page example to follow page links.
Don't: A hype word
Rendered by tag.tsOpen example: Tag · Don't: A hype word Use the full-page example to follow page links.
Don't: A status chip
Rendered by tag.tsOpen example: Tag · Don't: A status chip Use the full-page example to follow page links.
Rules
| Rule | Why | Check |
|---|---|---|
| A tag states provenance or a version, nothing else. | Small marks with other meanings would be confused with state. | Review: Content owner at review |
| Tags are outlined in the text colour, never filled with a dye. | Dye marks mean health or state (D-SITE-004). | Automated: brand gate (core/tag.css) |
API
| Prop | Type | Required | Default | What it does |
|---|---|---|---|---|
text | string | Yes | The provenance or version. | |
sample | boolean | No | false | In a figure head (sample-tag), no left margin. |
Contract details
The full contract: identity, anatomy, variants, states, tokens, layout, motion, accessibility, content, tests
Identity
| Aspect | Value |
|---|---|
| Id | tag |
| Layer | Atoms |
| Category | display |
| Owner | Site system lead |
| Status | stable |
| Version | 1.0.0 |
| Source | apps/showcase/site/system/atoms/tag.ts (private repository; the contract and the render function are this one module) |
| Version | Date | Change |
|---|---|---|
| 1.0.0 | 2026-10-26 | A small outlined word in a figure head: 'Sample data', 'Recorded server output', a version. |
Use when
- In a figure or panel head, to say the data's kind. Why: Provenance is the first thing a sceptical reader looks for.
- A version or source name next to a title. Why: It dates the evidence.
Do not use when
- As a status chip on marketing copy. Why: Status chips were removed (owner, 26 Oct); states live on What runs today.
- In a dye colour. Why: Colour in small marks means health or state; a tag is neither.
Anatomy
| Part | What it is |
|---|---|
| root | span.tag or span.sample-tag, outlined in currentColor. |
Made of: tokens:type, tokens:radius.
Used in: figure-frame, cloth-diagram, conformance-table, contract-excerpt, coverage-map, decision-list, design-md-excerpt, flow-diagram, product-screen, repo-tree, rows-list, system-of-systems, tile, token-chain.
Variants
| Variant | When | Why |
|---|---|---|
| inline | After a title in a tile or row. | It follows the words it qualifies. |
| sample | In a figure head. | It sits at the right of the head as the figure's provenance. |
States
| State | Rendered or not applicable |
|---|---|
| default | default |
| hover | Not applicable: A tag is not interactive, so it has no hover state. |
| focus-visible | Not applicable: A tag does not take focus; links and buttons inside it carry their own focus ring. |
| active | Not applicable: A tag cannot be pressed. |
| disabled | Not applicable: A tag has nothing to disable. |
| loading | Not applicable: A tag is rendered at build time and is complete when the page loads. |
| empty | Not applicable: A tag is not rendered without content; the builder skips it. |
| error | Not applicable: A tag shows no data that can fail. |
| current | Not applicable: A tag has no current item. |
| visited | Not applicable: A tag is not a link. |
| expanded | Not applicable: A tag does not open or close. |
Tokens
| Part | Token |
|---|---|
| root.font | --type-small-strong |
| root.border | --rule-hair inset in currentColor |
| root.radius | --radius |
| --tag-padding-space-1 | var(--space-1) |
| --tag-padding-space-3 | var(--space-3) |
| --tag-margin-left-space-3 | var(--space-3) |
| --tag-border-radius-radius | var(--radius) |
| --tag-font-type-small-strong | var(--type-small-strong) |
| --tag-box-shadow-rule-hair | var(--rule-hair) |
Layout
| Aspect | Value |
|---|---|
| breakpoints | Required review at 390, 768, 1024 and 1440 px; execution is not implied by this declaration; never wraps inside. |
| wrapping | white-space: nowrap; wraps as a whole onto the next line. |
| textExpansion | Short by rule (4 words). |
Spacing and rhythm
| Aspect | Value |
|---|---|
| internal | --space-1 by --space-3. |
| external | --space-3 to the left when inline. |
| rhythm | Not a section element. |
Motion
| Aspect | Value |
|---|---|
| None | Static. |
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 | text |
| name | Its words |
| keyboard | Not interactive. |
| focus | Not focusable. |
| screenReader | Read after the title. |
| contrast | Inherits the text colour, 4.5:1 or better. |
| target | Not a target. |
Content
| Slot | Length | Voice |
|---|---|---|
| text | 4 words | The data's kind or a version |
Good: “Sample data” · “Recorded server output” · “Loom Base 1.0.0, MIT”
Bad: “New!” · “Beta feature”
Japanese: From content tokens where repeated (caption.sample).
Icons and illustrations
None: this element uses no icon or illustration of its own.
Decisions and exceptions
Usage
39 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.