Layers (coming next)

Lets the reader stand in a layer (global brand, region, digital brand, product) and try a change: accepted, needs a reason, or a request to the rule's owner.

Organism · draft · v1.0.0 · owner: Site system lead · contract 19 of 20 points (open: figma)

Do and don't

Do: Under Coming next

Rendered by layers-demo.ts

Open example: Layers (coming next) · Do: Under Coming next Use the full-page example to follow page links.

Labelled as a plan.

Do: With the sample caption

Rendered by layers-demo.ts

Open example: Layers (coming next) · Do: With the sample caption Use the full-page example to follow page links.

Honest about its data; static copy stays English while prepared controls use root-owned Japanese messages.

Don't: In the Proof menu

Rendered by layers-demo.ts

Open example: Layers (coming next) · Don't: In the Proof menu Use the full-page example to follow page links.

Removed from the menu and grid.

Don't: As proof of a running feature

Rendered by layers-demo.ts

Open example: Layers (coming next) · Don't: As proof of a running feature Use the full-page example to follow page links.

Resolving tokens per layer does not run yet.

Rules

RuleWhyCheck
Layers (coming next) is computed by Loom's code from a sample organisation's layers and rules, not drawn by hand.A showcase is proof only if the product's own code produced what it shows.Automated: scripts/site/interactives/check.ts (recomputes the showcase data and fails on drift)
Shown only under Coming next.The site describes only what runs today.Automated: tests/site/pages.spec.ts (what runs today)

API

PropTypeRequiredDefaultWhat it does
instanceKeystringNoOptional deterministic scope for repeated root IDs and local ID references. Singleton omission preserves public anchors. Up to64 letters/digits/underscore/hyphen starting with a letter; repeated instances need distinct keys.
langen | jaNo"en"Prepared native control locale. Existing static explanatory and fallback copy remains English and is marked lang=en; native Japanese review remains open.

Contract details

The full contract: identity, anatomy, variants, states, tokens, layout, motion, accessibility, content, tests

Identity

AspectValue
Idlayers-demo
LayerOrganisms
Categoryshowcase
OwnerSite system lead
Statusdraft
Version1.0.0
Sourceapps/showcase/site/system/organisms/layers-demo.ts (private repository; the contract and the render function are this one module)
VersionDateChange
1.0.02026-10-26Layers (coming next): computed by Loom's code from a sample organisation's layers and rules.

Use when

  • Only under Coming next. Why: The layer view runs on sample data; it shows the plan.

Do not use when

  • In the demos grid. Why: Plans never sit with running demos (owner, 26 Oct).

Anatomy

PartWhat it is
rootdiv.demo-layers
stackThe four layer cards
rulesThe rules table with lock levels
outcomeWhat happens to the tried change
captionThis demo uses sample data.

Made of: showcase-frame, control, table, caption.

Used in: pages directly.

Variants

VariantWhenWhy
fullOn its demo page and its section.The whole experience where the claim is made.

States

StateRendered or not applicable
defaultProduct layer selected, rules listed
hoverRule rows highlight their source layer.
focus-visibleThe --focus ring on radios and buttons.
activeNot applicable: Buttons act instantly.
disabledNot applicable: Never.
loadingThe original sample rules remain readable while root-owned locale preparation and native chunk loading run.
emptyNot applicable: Always has rules.
errorPreparation or initialization failure retains/restores the English static sample; the host records failure and supports remount retry.
currentThe chosen layer is a checked radio.
visitedNot applicable: Not a link.
expandedThe outcome panel appears after a try.

Tokens

PartToken
lock.lockedink word
lock.overridable--saffron-ink word
source.card--rule --ink
--layers-demo-gap-space-7var(--space-7)
--layers-demo-gap-space-9var(--space-9)
--layers-demo-gap-space-4var(--space-4)
--layers-demo-margin-bottom-space-4var(--space-4)
--layers-demo-font-type-labelvar(--type-label)
--layers-demo-color-ink-2var(--ink-2)
--layers-demo-column-gap-space-5var(--space-5)
--layers-demo-margin-left-space-6var(--space-6)
--layers-demo-padding-space-5var(--space-5)
--layers-demo-background-cottonvar(--cotton)
--layers-demo-border-linevar(--line)
--layers-demo-border-radius-radiusvar(--radius)
--layers-demo-transition-dur-slowvar(--dur-slow)
--layers-demo-accent-color-indigo-inkvar(--indigo-ink)
--layers-demo-font-size-fs-smallvar(--fs-small)
--layers-demo-font-size-fs-labelvar(--fs-label)
--layers-demo-border-color-indigo-inkvar(--indigo-ink)
--layers-demo-box-shadow-indigo-inkvar(--indigo-ink)
--layers-demo-background-indigo-softvar(--indigo-soft)
--layers-demo-outline-indigo-inkvar(--indigo-ink)
--layers-demo-left-space-7var(--space-7)
--layers-demo-top-space-4var(--space-4)
--layers-demo-border-left-linevar(--line)
--layers-demo-padding-bottom-space-4var(--space-4)
--layers-demo-border-bottom-linevar(--line)
--layers-demo-margin-top-space-2var(--space-2)
--layers-demo-color-saffron-inkvar(--saffron-ink)
--layers-demo-gap-space-3var(--space-3)
--layers-demo-color-indigo-inkvar(--indigo-ink)
--layers-demo-padding-space-2var(--space-2)
--layers-demo-border-line-strongvar(--line-strong)
--layers-demo-color-madder-inkvar(--madder-ink)
--layers-demo-background-madder-inkvar(--madder-ink)
--layers-demo-color-teal-inkvar(--teal-ink)
--layers-demo-background-teal-inkvar(--teal-ink)
--layers-demo-background-saffron-inkvar(--saffron-ink)
--layers-demo-border-ink-2var(--ink-2)
--layers-demo-margin-top-space-5var(--space-5)
--layers-demo-border-top-rule-hairvar(--rule-hair)
--layers-demo-border-top-line-strongvar(--line-strong)
--layers-demo-border-color-madder-inkvar(--madder-ink)
--layers-demo-border-color-saffron-inkvar(--saffron-ink)
--layers-demo-border-color-teal-inkvar(--teal-ink)
--layers-demo-animation-dur-slowvar(--dur-slow)
--layers-demo-animation-dur-weavevar(--dur-weave)
--layers-demo-animation-ease-entervar(--ease-enter)
--layers-demo-margin-left-space-5var(--space-5)
--layers-demo-gap-space-2var(--space-2)
--layers-demo-animation-backgroundvar(--teal-soft)

Layout

AspectValue
breakpointsRequired review at 390, 768, 1024 and 1440 px; execution is not implied by this declaration; columns stack under 768 px and controls fill the row on phones.
wrappingText wraps; code panes scroll inside their own focusable region.
textExpansionJapanese strings come from the i18n tables and wrap; engine output stays English.

Spacing and rhythm

AspectValue
internalInside the Showcase frame's padding, controls and caption at its foot.
externalFull width of its section.
rhythmOne showcase per section, after the section's claim (D-SITE-008).

Motion

AspectValue
movesTrying a change retains the authored bump/glow cue on the selected rule.
triggerTry a change button.
duration--dur-slow in steps(4), twice for a locked bump; --dur-weave × 3.3 for other glow
easingsteps(4) for bump; --ease-enter for glow
interruptibleHidden/offscreen/reduced motion or disposal clears the transient cue; outcome remains readable.
reducedOutcome text and source highlight update without a bump or glow.
whyThe cue connects an illustrative rule to its stated outcome; it is not a real governance action.

Runtime and reuse

  1. stylesheet: /css/site.css. Built Site tokens, core and registered element CSS; preserve modes, focus and responsive rules.

  2. stylesheet: /css/demos.css. Existing legacy demo styles where the rendered specimen uses them.

  3. font: /fonts/. Self-hosted files referenced by Site @font-face, with licences; Japanese locale overrides remain applicable.

  4. data: /i18n/ja.json. Required for a Japanese root; English interface fallbacks are authored in source. Root language changes require disposal and fresh preparation.

  5. Static fallback: Original build-time specimen remains readable before loading and after chunk/initialization failure; enhancement controls retain authored hidden state.

  6. Before DOM initialization the configured host awaits apps/showcase/site/demos/layers.ts#prepare for this root with a mount-owned AbortSignal. Preparation must throw on missing/invalid data; disposal/replacement aborts pending work, and a stale result cannot initialize or claim ready.

  7. Configured initializer: apps/showcase/site/demos/layers.ts#init. The host owns transactional static-markup restoration and runtime state.

  8. Consumer module (imports relative to the configured source root):
    import { createRuntimeHost } from "./src/workflows/runtime-host";
    import { SITE_RUNTIMES } from "./apps/showcase/site/runtime-registry";
    const definition = SITE_RUNTIMES.find(entry => entry.binding.id === "layers");
    if (!definition || definition.binding.lifecycle.kind !== "managed") throw new Error("Managed runtime binding unavailable");
    const host = createRuntimeHost([definition]);
    export function mountRuntime(container: ParentNode) { return host.mountAll(container); }
  9. After inserting the rendered markup, call mountRuntime(container) for the container holding [data-demo="layers"]. Retain the returned disposal function and call it before removing, replacing or remounting, including every Storybook args render. The configured host restores captured static markup/attributes on disposal or caught load/initialization failure; retry starts a fresh managed remount.

Accessibility passport

AspectValue
roleregion with a heading, or a figure
nameIts heading or caption
keyboardTab to the controls; Space plays or pauses; arrows move the steps; End shows the last step.
focusControls in reading order; focus never moves on its own.
screenReaderManual frame selection and pause announce their settled content. Explicit Play announces the final settled summary once; autoplay and system interruption/disposal stay silent. Legacy initializers outside the shared player remain explicitly unassessed.
contrastInk on surface 14:1; state dyes only as marks with words.
targetControls are 44 px.

Content

SlotLengthVoice
caption1 sentenceThis demo uses sample data.

Good: “This demo uses sample data.”

Bad: “Your organisation's layers”

Japanese: Static explanatory/fallback copy remains English and is explicitly labelled. Prepared controls use root-owned EN/JA catalogue messages; native Japanese acceptance remains open.

Icons and illustrations

None: this element uses no icon or illustration of its own.

Decisions and exceptions

Usage

85 uses across the built pages (measured by npm run site:system).

Tests

AspectValue
unittests/unit/site-system.test.ts: renders every do and don't example through the registry and checks the classes it owns
visualNot yet: there are no screenshot baselines; the Library page is checked for sideways scroll at 1440 px by tests/site/system.spec.ts
a11ytests/site/system.spec.ts: axe (0 serious or critical) on the element's Library page in light and dark
parityscripts/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.

Open in Storybook

Start with a conversation about your system.

We read your system, show you what we found, and agree with your team what to fix first.