Template · stable · v1.0.0 · owner: Site system lead · contract 19 of 20 points (open: figma)
Do and don't
Do: Role pages
Rendered by persona-strip.tsOpen example: Role switcher · Do: Role pages Use the full-page example to follow page links.
Do: Current marked
Rendered by persona-strip.tsOpen example: Role switcher · Do: Current marked Use the full-page example to follow page links.
Don't: On a product page
Rendered by persona-strip.tsOpen example: Role switcher · Don't: On a product page Use the full-page example to follow page links.
Don't: As a dye field
Rendered by persona-strip.tsOpen example: Role switcher · Don't: As a dye field Use the full-page example to follow page links.
Rules
| Rule | Why | Check |
|---|---|---|
| The strip uses the quiet band, never a dye. | It sits right under the page head's field; two dyes would touch (D-SITE-002). | Automated: scripts/site/system/check-pages.ts (adjacent fields) |
API
| Prop | Type | Required | Default | What it does |
|---|---|---|---|---|
items | list | Yes | The roles (label, href). | |
path | string | Yes | The current page, marked aria-current. |
Contract details
The full contract: identity, anatomy, variants, states, tokens, layout, motion, accessibility, content, tests
Identity
| Aspect | Value |
|---|---|
| Id | persona-strip |
| Layer | Templates |
| Category | section |
| Owner | Site system lead |
| Status | stable |
| Version | 1.0.0 |
| Source | apps/showcase/site/system/templates/persona-strip.ts (private repository; the contract and the render function are this one module) |
| Version | Date | Change |
|---|---|---|
| 1.0.0 | 2026-10-26 | Role switcher as one module: its markup moved out of the page builder (scripts/site) into the system. |
Use when
- Role and solution pages. Why: Readers often land on the wrong role first.
Do not use when
- On the roles hub. Why: The hub already lists every role.
Anatomy
| Part | What it is |
|---|---|
| root | nav.personas.field-quiet labelled Roles |
| list | ul of links; the current role has aria-current |
Made of: dye-field, text-link.
Used in: page-deep.
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 | The link underlines. |
| focus-visible | The --focus ring. |
| active | Not applicable: A link. |
| disabled | Not applicable: Every role is a page. |
| loading | Not applicable: Build time. |
| empty | Not applicable: Not rendered without a group. |
| error | Not applicable: No data that can fail. |
| current | The current role is bold with aria-current=page. |
| visited | Not applicable: Visited roles keep their colour. |
| expanded | Not applicable: Does not open. |
Tokens
| Part | Token |
|---|---|
| root.background | --field-bg of the quiet band |
| current.font | --type-strong |
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-4 vertical padding. |
| external | Directly under the page head's edge. |
| rhythm | Page head, persona strip, body. |
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 |
|---|---|---|
| label | 3 words | The role name |
Good: “Design-system leads”
Bad: “Persona 1”
Japanese: Role names from nav-ja.
Icons and illustrations
None: this element uses no icon or illustration of its own.
Decisions and exceptions
Usage
10 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.