Skip to content
LSD Framework
LSD primitive · surfaces

Surface Tier Picker

Three tiers — low, elevated, high — stacked like a tide. Pick one and every nested component recolors through token rewrites alone. No mode-name lookup tables. No painted CSS. Just surface tokens behaving like the substrate they always wanted to be.

data-tier · --bg / --bg-elev / --bg-elev-2 Surfaces Panel · live ↩ All components
01 · Three-tier swatch · hero contextdata-tier
Live context · surface = elevated

The cards adapt without writing a single mode.

Nebula

Colour as constellation, not as paint.

Orion

Components read tier, never raw hex.

Aurora

Animation breathes through the same surface.

02 · Tier inspector · which tokens drive what--bg* family
Lowtier 1
--bg
--ink
--line
--ink-faint
Elevatedtier 2
--bg-elev
--ink
--line-strong
--accent
Hightier 3
--bg-elev-2
--ink
--accent-2
--accent-3
03 · Side-by-side · same card · three tierscompare
low
Sign in
elevated
Sign in
high
Sign in
04 · Tier morph · hover to cycletransition: background 600ms
current tier · low · hover or focus
UsageAPI surface

Authoring contract

A picker writes --bg, --bg-elev, and --bg-elev-2 onto the target surface. Components inside read those tokens — none of them know which tier they're in. Switching is a token rewrite, not a class swap. Reduce-motion users see an instant swap; everyone else sees a 600ms morph.

HookValuesEffect
data-tierlow · elevated · highCurrent tier on the swatch / morph host.
aria-pressed on swatchbooleanSelected tier indicator (radio semantics).
--bgcolour tokenTier 1 surface — page floor.
--bg-elevcolour tokenTier 2 surface — default card / panel.
--bg-elev-2colour tokenTier 3 surface — popovers, lifted UI.
--line / --line-strongcolour tokenBorders pair with the tier above.
JS eventstp:changeFires on the host with detail.tier.
prefers-reduced-motionMorph transition collapses to 0ms.
View HTML
<div class="lsd-stp">
  <div class="lsd-stp__row" role="radiogroup">
    <button class="lsd-stp__swatch" data-tier="low" role="radio" aria-pressed="false">…</button>
    <button class="lsd-stp__swatch" data-tier="elevated" role="radio" aria-pressed="true">…</button>
    <button class="lsd-stp__swatch" data-tier="high" role="radio" aria-pressed="false">…</button>
  </div>
  <div class="lsd-stp__context" data-stp-context>…</div>
</div>
LSD components · Surface Tier Picker · primitive
↩ All components