Scroll-linked Hue Hero
A hero that repaints through the colour wheel as you read: one scroll handler converts scrollTop into a hue angle that drives sky, chip and CTA glow together.
Hue is treated as data: one scroll handler converts scrollTop into a colour angle, and the section repaints through the whole journey — from indigo dusk to ember orange.
CTA block — its glow is the same hue variable
one variable drives sky, chip and glow; nothing else changes.
end of scroll · hue 224° — scroll back up to rewind it
Ambience is a live light wash over the preview. Full palette re-theming of every demo arrives with Theme Studio (Pro).
// React — hue is derived state from scrollTop
const onScroll = () => {
const el = scroller.current;
const max = el.scrollHeight - el.clientHeight;
setHue(Math.round(212 + (el.scrollTop / max) * 130)); // 212° → 342°
};
<div ref={scroller} onScroll={onScroll} className="overflow-y-auto">
<section style={{ background: `linear-gradient(160deg,
hsl(${h} 85% 12%), hsl(${(h + 55) % 360} 70% 20%), hsl(${(h + 110) % 360} 80% 9%))` }}>
…copy and CTA…
</section>
</div>
// the same h drives the hue chip and the CTA glow → one variable,
// one repaint budget. Guard with a rAF/throttle for heavy sections.Snippet provenance
lines 1–14 · v1.0.0No changelog entry mentions “Scroll-linked Hue Hero”, so the catalog records a single version for it.
Every line above is attributed to the single version this catalog records — we keep no per-line history, so no per-line attribution is invented. See the provenance page for the rule and the gaps.
Review notes · anchored to code lines
Threads attach to a line number in this asset's snippet, so a remark about the focus trap stays next to it.
Loading notes…
The snippet on this page is 14 lines long, so anchors run 1–14. Notes are per-asset and per-browser; a shared review thread is a server feature, and this panel is the local stand-in that proves the anchoring works.
Why it works — Long hero sections get scrolled past; when the skyline repaints with the journey, reading position becomes a visual event instead of a mystery.
The idea — Treat hue as derived scroll data: one variable drives sky, accents and glow, which keeps the section coherent at every position.
When to skip it — If the section is above the fold only, scroll-linking is dead weight — reserve it for sections that genuinely take a few viewports to read.
Course rail — understand it before you ship it
Live variants
Variant gallery
The same Scroll-linked Hue Hero demo re-lit in three tones — no code change, three personalities.
Hue is treated as data: one scroll handler converts scrollTop into a colour angle, and the section repaints through the whole journey — from indigo dusk to ember orange.
CTA block — its glow is the same hue variable
one variable drives sky, chip and glow; nothing else changes.
end of scroll · hue 224° — scroll back up to rewind it
Hue is treated as data: one scroll handler converts scrollTop into a colour angle, and the section repaints through the whole journey — from indigo dusk to ember orange.
CTA block — its glow is the same hue variable
one variable drives sky, chip and glow; nothing else changes.
end of scroll · hue 224° — scroll back up to rewind it
Hue is treated as data: one scroll handler converts scrollTop into a colour angle, and the section repaints through the whole journey — from indigo dusk to ember orange.
CTA block — its glow is the same hue variable
one variable drives sky, chip and glow; nothing else changes.
end of scroll · hue 224° — scroll back up to rewind it
Theme Studio preview
Theming example — two token themes
Assets are token-driven (100% design-token driven). Here the same scene runs under two theme presets from the token sheet.
Hue is treated as data: one scroll handler converts scrollTop into a colour angle, and the section repaints through the whole journey — from indigo dusk to ember orange.
CTA block — its glow is the same hue variable
one variable drives sky, chip and glow; nothing else changes.
end of scroll · hue 224° — scroll back up to rewind it
--accent 262 · dark surfaces
Hue is treated as data: one scroll handler converts scrollTop into a colour angle, and the section repaints through the whole journey — from indigo dusk to ember orange.
CTA block — its glow is the same hue variable
one variable drives sky, chip and glow; nothing else changes.
end of scroll · hue 224° — scroll back up to rewind it
--accent 40 · paper surfaces
90-second read
Usage recipe — where this fits
Use it as the signature of a single screen — a hero backdrop, an entrance, a transition. One signature per screen; everything else stays quiet.
Compose it with calm content around it: the motion earns attention only when the layout does not compete for it.
Cost honesty
Performance note
Cheaper alternative — the static preview variant removes the animation loop and keeps the layout — a quieter, cheaper sibling.
What it needs
Browser support strip
No polyfills ship with the asset — if a listed feature is missing in a target browser, the graceful fallback is the static layout.
prefers-reduced-motion
Reduced-motion fallback
With prefers-reduced-motion: reduce, the animation loop and travel are removed; state changes keep working through opacity and colour (≤ 300ms). The demo you see above honours the switch — try it in your OS settings and the loop will quiet down.
Design rule: the reduced branch is a second design, not a stripped page — every state change stays visible.
Pressable step-through
Keyboard walk demo
Step through what a keyboard user experiences with this asset.
Tab to the scene — motion is paused or non-essential for keyboard users
Auto-suggested
Composition map — what pairs well
Same-family assets that compose cleanly with this one:
Aurora Veil
Layered mesh of drifting colour fields behind a fine grain veil. Built on GPU-composited CSS gradients — a 60 fps full-page backdrop at 0 JS.
AnimatedHalo Trail
Cursor trail of fading halos that also reacts to pressed state — an attention magnet for product demos. Pointer-events transparent, fully throttled.
AnimatedOrbit Deck
A 3D ring of cards/badges orbiting a focal chip with depth-of-field blur. Pause on hover, tilt with drag, auto-rotate for ambient showcase.
Learn essays that teach the technique
One original micro-case
Inspiration context
The hero that held attention for one beat longer
A marketing page's hero used a stock fade-in that finished in 200ms — invisible to the eye, useless to the story. Re-timed with a slow settle (0.6s, ease-out-quart) and one typographic wipe, the hero read as 'alive' without a single new asset. The change was purely a curve and a delay.
Written in-house — no screenshots, no borrowed imagery. The pattern, not the pixels.
Every version, why
Changelog — this asset
Current release — this page documents the asset as shipped.
Token pass: colours and radii moved to the design-token sheet; a11y score raised to the current bar.
Initial release to the library — original markup, MIT licensed.
30-day sparkline
Copy history
Sample series from this asset's usage fingerprint · last 12 days shown.
Future queue
Community remixes
Queue opens after launch. Remixes arrive as alternate versions of this asset — same job, different voice — submitted by users and audited by the studio before they appear beside the original.
Star / favourite
Save this asset
Your collection is stored in this browser (localStorage) — no account needed.
Build a page around it
Pairs well with a prompt
This asset belongs inside a bigger build — here is the prompt that would generate a page containing it:
Motion-spec page — the animation before the layout
Spec sheet · Timing table · Easing curves
Exact tree
Bundled dependencies — disclosed
Full snippet ≈ 0.9 KB raw, ~1 KB gzip — before any framework you already load.
Download
Export as single file
Grab the asset as one file, ready to paste into your project.
Files are generated in your browser from the snippets on this page — nothing leaves the tab.
Scale, not clutter
Sizing system — three densities
Density is a token decision, not a per-page override — pick one density per product surface and hold it. Active: Default.
Runnable copy
Open in a sandbox
Opens this asset in a new tab with its stylesheet injected — a real, editable HTML document in your browser. No account, no upload.
If the tab is blocked, use the single-file export instead — same content, saved locally.
Written version first
Tutorial transcript
This asset does not have a video yet — so the written version stands in: the code line walk below narrates the snippet line by line, and the design rationale on this page explains the default decisions. When a video ships, this exact panel hosts its full transcript.
Annotated snippet
Code line walk
The lines that matter, with the reason they matter. Click one:
Trade-off, visible
Size vs. quality slider
Standard · CSS + hover states
~6 KBadds transitions, focus-visible and reduced-motion rules
The slider is honest: the slim tier has no JS, the pro tier pays for behaviour. Start slim, upgrade only the surfaces that need it.
HTML → React, priced
Stack-switch cost note
Taking the HTML/CSS version into a React component costs real work — and the cost is predictable:
Event wiring
Hover, focus and click become handlers — the CSS stays, the state appears.
Props for the knobs
Every inline value that should vary becomes a prop with a default — the defaults must match the CSS exactly.
The estimate
A clean port of this asset is 20–45 minutes for a React developer — the 259-character stylesheet is the easy half.
Find it the way you say it
Tag synonyms
When to pick which
Sibling comparison
| Compare | Scroll-linked Hue Hero | Aurora Veil | Halo Trail |
|---|---|---|---|
| Kind | Animated | Animated | Animated |
| Bundle | 1.1 KB gzip | 2.6 KB gzip | 5.8 KB gzip |
| a11y | 96/100 | 100/100 | 93/100 |
| Dependencies | none | none | none |
| Copies / mo | 340 | 8,940 | 6,330 |
| Interactions | scroll | scroll | drag, hover |
The honest verdict — Scroll-linked Hue Hero is the lighter default here; reach for Aurora Veil when its extra weight buys an interaction this one lacks.
Similar to this — scored on shared tags, not hand-picked
Related assets
Read next — two guides and a prompt
picked by tag overlap, not by handGuide
Colour contrast you can compute
10 min · Intermediate · updated 2026-09-10
Guide
Contrast on brand colours
9 min · Intermediate · updated 2026-09-10
Prompt
3D portfolio with neon orbit showcase
Portfolio · 87% fidelity
How these three were chosen: essays scored on shared tags (1 and 1 matches), then prompt scored on block/vibe overlap (1 matches). The rule lives in src/lib/spine.ts, so the same asset always links to the same three pages and a second reader can reproduce the choice.