The craft of animating a product interface into a short video - the 12-second beat structure, what makes a UI read as real instead of a wireframe, the motion discipline that keeps it from looking cheap, the seven techniques worth reusing (count-up, stagger, bars from a baseline, SVG draw-on, layout-placed tooltips, a pointer path, a scrolling phone), and how to get from a real React + Vite app to a deterministic composition.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Html Ui Animation?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vecnode-html-ui-animation)
---
name: html-ui-animation
description: The craft of animating a product interface into a short video - the 12-second beat structure, what makes a UI read as real instead of a wireframe, the motion discipline that keeps it from looking cheap, the seven techniques worth reusing (count-up, stagger, bars from a baseline, SVG draw-on, layout-placed tooltips, a pointer path, a scrolling phone), and how to get from a real React + Vite app to a deterministic composition.
whenToUse: Use when the request is a product demo, launch clip, feature announcement, dashboard or app mockup in motion, when an existing UI has to be turned into a video, or when a UI animation looks like a slide deck with things flying in.
---
# Animating an interface
A UI video is an argument that the product is calm, fast and finished. Every frame either
supports that or undercuts it. The common failure is not a missing animation - it is a
real screen with everything moving at once, in the same easing, over placeholder text.
## The shape of 12 seconds
| Time | Beat | Why |
|---|---|---|
| 0.0–0.8 | the shell arrives | the viewer needs one frame to learn where they are |
| 0.8–2.0 | the heading and the primary content | establish what this screen is |
| 2.0–4.5 | the data lands: numbers, bars, a ring | the part that says "this is working" |
| 4.5–6.5 | secondary regions: a list, a table, a panel | depth without noise |
| 6.5–8.5 | ONE interaction: a pointer, a tooltip, a toggle | a pointer is what makes it read as software |
| 8.5–9.5 | a confirmation: a toast, a check, a state change | the ending a demo needs |
| 9.5–12.0 | hold | a cut on the last frame reads as an accident |
Shorter is fine; longer needs another beat, not a slower one. Nothing should start after
~80% of the runtime.
## Real, not a wireframe
- **Use the product's own tokens.** If the app has a tokens file or a Tailwind config, take
the hex values and the type scale from it. A video in invented colours will not match the
product page it sits next to.
- **One accent, used twice.** A second accent is a second brand. Grey structure plus one
colour that marks the live, the active and the primary action.
- **Hairlines, not shadows.** `1px solid rgba(255,255,255,.08)` on a slightly lighter
surface reads as a real dark product; three stacked box-shadows read as a mockup.
- **A type scale, not sizes.** Pick four sizes (e.g. 30/16/14/12) and stay there. Negative
tracking on the largest, `font-variant-numeric: tabular-nums` on every number.
- **Real copy.** "Revenue overview · Last 30 days · all regions" is a product. "Lorem
ipsum" and "Your text here" tell the viewer nothing was built.
- **Density is credibility.** A dashboard with 4 KPIs, a chart, 12 labels and a 4-row
table looks used. Three big cards look like a template.
## Motion discipline
- Moves are **0.4–0.9 s**. A 0.2 s move is a twitch; a 1.5 s move feels broken.
- `power2.out` / `power3.out` for arrivals, `power2.inOut` for a state that persists
(a line drawing, a fill expanding). Not the same ease everywhere - the eye catches it.
- **Stagger 0.05–0.12 s.** More than 0.15 s and the group stops reading as a group.
- **One thing moves at a time per region.** Two regions animating together is fine; two
elements inside one card is noise.
- **Holds earn the ending.** The last 2 s are still. A film that is moving on its final
frame has no last beat.
## Seven techniques worth reusing
1. **Count-up.** Tween a plain `{v: 0}` object and write `textContent` in `onUpdate`. The
number is then a function of time, which is what makes it render the same every run.
2. **Stagger.** One `tl.from(".card", { opacity: 0, y: 18, stagger: 0.1 })`, not four
tweens at hand-computed offsets.
3. **Bars from a baseline.** `transform-origin: bottom` plus `scaleY: 0 → 1`. Never a
`height` tween: the linter rejects layout properties, and for good reason.
4. **SVG draw-on.** A stroke with a `stroke-dasharray` equal to its length, then
`attr: { "stroke-dashoffset": 0 }`. Icons and arcs both work.
5. **A tooltip placed from the layout.** Read `bar.offsetLeft` / `bar.offsetTop` once
inside a positioned parent and set the tooltip's `left` / `bottom` in px. A guessed
percentage lands on the wrong bar the moment a label changes width.
6. **A pointer path.** A 20 px arrow that travels to a target over 0.9 s and then rests.
Fade it in just before it moves - a cursor visible from frame 0 looks like an artefact.
7. **A phone that scrolls.** A tall inner column translated inside an `overflow: hidden`
screen. Never `scrollTop`: it is a scroll position, not a transform, and it does not
seek.
## From a React + Vite app to a composition
The renderer seeks a paused timeline. A live app runs on `requestAnimationFrame`, timers
and state - all banned, because none of them can be seeked. So there are exactly three
routes, in order of how often they are right:
1. **Re-author the screen (usually right).** A screen is structure + a data snapshot. Copy
the markup and the CSS (DevTools → *Copy outerHTML*, or read the JSX and transcribe it),
replace the state with literal values, and write the motion as a timeline. This gives a
deterministic composition, no build step, and the freedom to animate the parts that
matter. Keep the class names and the tokens so it stays recognisable.
2. **Freeze the build.** `npm run build`, then bring `dist/` in as `assets/`: the JS bundle
is no longer needed for a picture, so take the rendered DOM from the built page instead
of the bundle. Relative URLs matter - Vite's `/assets/...` has to become `assets/...`,
and a router needs one route chosen for you.
3. **Drive the real app (only if it was built for it).** An app that exposes
`renderAt(t)` can be mounted and stepped from a frame source. That is a change to the
app, not to the video, and it is the only honest way to film canvas, WebGL or a live
chart that computes as it draws.
**What breaks in every port:** data fetching (bake the response), relative asset paths,
fonts loaded from a CDN, CSS `transition` (rewrite as a timeline tween), scroll position
(a transform), and any animation that lives in a `useEffect` with a timer.
Get the reference right before animating: `shot_url` against `http://localhost:5173` (or
the built page) gives you the exact frame you are rebuilding, at the same viewport, and the
comparison catches a spacing mistake immediately.
## What not to claim
A video of an interface is a statement about the product. Do not show a state the product
cannot reach - a chart with impossible numbers, a button that does nothing, a speed that no
request achieves. If the demo is illustrative, say so in `caption.md`, next to the alt text
of the poster frame.