Hero Motion¶
How the hero extension's animated backgrounds and entrances look and behave, and why. What each setting does for a shop owner is in Hero background effects.
What changed and why¶
The hero first shipped with three background effects (constellation, flow field, grid glow) at two levels, Subtle and Normal, and with one entrance: a 24px fade-up on the Centered preset only. In the November 2026 review both read as too faint. The canvas drew at 60% or 100% of an already low opacity, and a mask cut it to about a third behind the copy, so on most screens the effect was easy to miss. Grid glow also felt flat: the pointer only slid its glow spot sideways.
The review kept everything and added range:
- Three stronger levels, Present, Bold and Showpiece. Present is the new default.
- Sliders for each setting under the level, so a shop can take a level and change one thing.
- Three new effects: Terrain (grid glow given height, which reacts to the pointer and to a click), Globe (a dotted globe with the shop's shipping arcs, which visitors can spin) and Aurora (large soft fields of brand colour).
- An entrance on every preset, with six styles and timing sliders.
Grid glow stays for heroes that use it, but it is listed last in the guidance: Terrain does what it does with more depth.
Levels and sliders¶
A level is a set of starting values (HeroEffectLevel):
| Level | Strength | Speed | Density | Size | Pointer | Shows behind the text |
|---|---|---|---|---|---|---|
| Subtle | 0.6 | 1 | 1 | 1 | 1 | 0.33 |
| Normal | 1 | 1 | 1 | 1 | 1 | 0.33 |
| Present (default) | 1.5 | 1.3 | 1.2 | 1.3 | 1.6 | 0.55 |
| Bold | 2.2 | 1.7 | 1.4 | 1.7 | 2.2 | 0.7 |
| Showpiece | 3 | 2.2 | 1.8 | 2.2 | 3 | 0.85 |
Each slider is an override of one value (backgroundEffectTuning). The rules a later change must
keep:
- The server resolves, the browser draws.
HeroEffectTuning.resolveturns the level and the overrides into final numbers, clamped to each setting's range, and the template writes them onto the canvas asdata-hero-effect-*attributes.hero-background.jshas no levels of its own. To add or retune a level, change the enum; the storefront and the admin's sliders (which read each level's values from its<option>) follow. - Only overrides are stored. Moving a slider stores that one key; the others keep following the level, so changing the level later still changes them. "Reset to the level" deletes the overrides.
- The mask keeps text legible at every level. "Shows behind the text" only lets more of the effect through under the copy; the copy itself always sits above the canvas. Showpiece's 0.85 is the highest default: behind a long paragraph, use Present or lower.
- A stored
subtleornormalkeeps drawing as before. Only heroes with no level, or one this version doesn't know, get the new Present default.
The new effects¶
- Terrain. A wireframe landscape rolling towards the viewer, its peaks picked out in the glow colour. The ground rises into a hill under the pointer, and a click sends a ripple across it. Relief sets the height of the hills.
- Globe. Land as dots on a sphere, from a 1-degree land map baked into the script (Natural Earth 1:50m, Antarctica left out, about 4KB as run lengths). It drifts, steers towards the side the pointer is on, and can be dragged; after a drag it keeps its momentum. With a home point set, arcs fly from the shop to each destination and a ring opens where each lands. The home side faces the viewer on load. A spinning globe on its own is a common sight on software sites; the arcs are what make it say something about the shop, so the guidance offers it to shops that ship widely, not as a default.
- Aurora. Three to nine large radial fields in the primary, secondary and accent colours, drifting slowly and leaning towards the pointer. The calmest of the six; it suits busy copy.
Dragging and clicking never take over the hero's own links, buttons or fields: a press that starts
on one is left alone. On touch screens the hero keeps vertical scrolling (touch-action: pan-y), so
a horizontal swipe spins the globe and a vertical one scrolls the page.
Entrances¶
HeroEntrance names the style and its default timing; the section gets nova-hero--enter
nova-hero--enter-<style> and the timing as --hero-enter-travel, --hero-enter-duration and
--hero-enter-stagger. The accent and eyebrow arrive first, then the title, the text, the buttons
and the stats, one stagger apart.
| Style | What moves | Travel | Duration | Stagger |
|---|---|---|---|---|
| Fade up | Fades up a short way, eased out (the original) | 24px | 0.8s | 0.15s |
| Rise | A longer rise with a long, soft landing | 64px | 1.1s | 0.14s |
| Blur in | Sharpens into place as it rises | 36px | 1.0s | 0.16s |
| Wipe up | Each line revealed from below | 48px | 0.9s | 0.12s |
| Settle | Scales down slightly into place | 40px | 1.0s | 0.12s |
| Word cascade | The title arrives word by word | 40px | 0.8s | 0.18s |
- Auto keeps the old behaviour.
entrancedefaults toauto: Fade up on Centered, none on the other presets, with Fade up's original timing. No hero changes until someone picks a style. - Every style except Fade up draws the accent line out from the left.
- Word cascade splits the title into words with
modules/hero-entrance.js, loaded only when a hero uses it. Until it runs the title is hidden; if it never runs, the CSS shows the title after a second, so the title can't stay hidden. - The entrance timings are the one place the hero writes custom properties from data onto the
section's
style, as it already did for the photo and the split colours. They are built from numbers only on the server.
Reduced motion¶
Under prefers-reduced-motion: reduce every effect draws one still frame and ignores the pointer,
drags and clicks, and no entrance runs: the copy is there at once and the title is never split.
Mock-ups¶
- Hero Motion Lab (November 2026): the levels, sliders and effects side by side, with the entrances, on a dark and a light hero. It is where the numbers in the tables above were chosen.