design-to-motion — Claude Code skill: animate a design
design-to-motion is a Claude Code skill that turns a static design into an animated HTML replica. It activates for requests to animate a Figma frame, screenshot, dashboard, card set, or hero.
MIT ★ 85 updated 2026-11-15
npx skills add huytran1120/vie-agentic-skills --skill design-to-motion -a claude-codeWhat design-to-motion does
The skill rebuilds a design as HTML, then gives its elements entrance motion and repeating visual stories. For a showcase, it exports an MP4 for X, a website GIF, and an 800×500 GIF. On a website, it animates qualifying sections while keeping text as live HTML.
First, it distinguishes a standalone showcase from animation inside a website; the choice changes how the motion starts and what gets delivered. Website sections use IntersectionObserver, and prefers-reduced-motion: reduce leaves them in their final state without story loops. This skill does not cover interaction motion in a shipping product, such as menus or toasts.
What it helps with
- animate a static Figma design for a showcase
- give dashboard elements a visual sequence
- add entrance motion to a landing-page hero
- export a design animation as MP4 and GIF
Example prompts for the agent
- Animate this Figma screen as a showcase and export a video.
- Add an entrance animation to the landing-page hero and story loops to its cards.
- Turn this dashboard into an animated showcase and export a GIF.
How to install design-to-motion
1Skills CLI (Vercel)
npx skills add huytran1120/vie-agentic-skills --skill design-to-motion -a claude-code2Manually: put the files in place
~/.claude/skills/design-to-motion/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/design-to-motion/
1Skills CLI (Vercel)
npx skills add huytran1120/vie-agentic-skills --skill design-to-motion -a codex2Manually: put the files in place
.agents/skills/design-to-motion/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add huytran1120/vie-agentic-skills --skill design-to-motion -a cursor2Manually: put the files in place
.cursor/skills/design-to-motion/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install huytran1120/vie-agentic-skills skills/design-to-motion2Manually: put the files in place
.github/skills/design-to-motion/SKILL.md1Skills CLI (Vercel)
npx skills add huytran1120/vie-agentic-skills --skill design-to-motion -a gemini-cli2Platform CLI
gemini skills install https://github.com/huytran1120/vie-agentic-skills --path skills/design-to-motionManually: put the files in place
.devin/skills/design-to-motion/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about design-to-motion
How do I install design-to-motion in Claude Code?
Run npx skills add huytran1120/vie-agentic-skills --skill design-to-motion -a claude-code. The skill file is placed at ~/.claude/skills/design-to-motion/SKILL.md.
What does design-to-motion do?
It rebuilds a static design as animated HTML. For a showcase, it can also export an MP4 and GIFs.
Can design-to-motion animate menus in a shipped product?
No. It covers design showcases and website sections, not product interactions such as menus or toasts.
Source text
SKILL.md · MIT
---
name: design-to-motion
description: "Turns a static design (a Figma frame, dashboard, card set, app screen, or a UI on a photo background) into a pixel exact HTML replica that loads in from an empty state, then has every visual act out what it does (a chart being read, a list receiving items, a prompt being typed) in a seamless loop, and exports an MP4 for X, a website GIF, and an 800×500 GIF. Use this skill whenever the user asks to animate a design, a Figma link, a screenshot, UI cards, a dashboard, or a hero image, to make a loading or appear animation, a showcase loop, a motion mockup, or a video or GIF of a design, even when they only say \"animate this\". Also use it on landing pages and websites for bento and feature cards that pair text with a visual, and for product or dashboard mockups. Always consult it before exporting layers, choosing what moves, building the intro, writing the visual story loops, or encoding video and GIFs."
category: design
tags: [design, motion, animation, figma, html-animation, ui-ux, css-animation, showcase, prototype]
risk: safe
source: community
source_repo: "elayadesign/ai-design-skills"
author: "elayadesign"
date_added: "2026-10-27"
---
# Design to Motion
A showcase animation is not a redesign. The viewer must see **the exact design**, and must see that **it is alive**.
**exact frame → empty state → smooth load → every visual acts out its story → seamless repeat.**
This skill has three parts. **Part A** rebuilds the design so the finished frame is indistinguishable from the source. **Part B** is the motion system. **Part C** records and exports. Work through A before touching B, and never encode anything before the checks in A7 and B9 pass. Parts A and B apply in both contexts below; Part C is for the showcase, or for a website only when exports are asked for.
## Scope
Apply to any request to animate a static design: Figma frames, UI cards, dashboards, app screens, marketing heroes, product mockups, and designs placed on a photo background. When a rule here conflicts with a framework default, this file wins. When the user's explicit prompt conflicts with a rule, the user wins.
**Not for** interaction motion inside a shipping product (hovers, menus, toasts). For that, use a product motion skill such as [emilkowalski/skills](https://github.com/emilkowalski/skills). **Companion skill:** `landing-page-design` in this repo, when the animation will live on a landing page.
## Two contexts
Decide the context before anything else. It changes what you animate, how the motion starts and ends, and what you deliver.
| | **Showcase** | **Website** |
|---|---|---|
| Typical request | "Animate this design for me", a Figma link and nothing else | Building or editing a landing page or site, or the request names one |
| What gets animated | The whole frame | Only the sections that qualify (table below) |
| Start | Page load, from the empty state | When the section scrolls into view, once |
| After the intro | Stories run, then the frame dissolves and the cycle repeats (B5) | Stories run forever. No dissolve, no cycle |
| Text | Exported layers, so the frame is pixel exact | Live HTML text in the site's font, for SEO and accessibility. Only the visual parts are exported images or SVG |
| Deliverables | The page plus MP4 for X, website GIF, 800×500 GIF (Part C) | The animated sections inside the site's code. Exports only when asked |
If the request does not say which, look at where you are working: inside a site's codebase, assume website. With only a design and no site, assume showcase. If it is still unclear, ask once.
### Website: which sections get which motion
Scan the page section by section. Apply this skill only where a section has a visual part, plus the hero (below). Never animate any other text section with it.
| Section | Apply |
|---|---|
| **Hero (always)**, with or without a visual: the header, headline, subtext, buttons, and proof line | The hero appear (below) on page load. Any visual inside the hero then follows its own row in this table |
| Bento and feature sections: cards with text plus a visual (a chart, list, flow, calendar, prompt, player) | Card intro on scroll (B2, `card` kind, text included), then a story loop on each card's visual (B4). This is the main use on a landing page |
| Product or dashboard mockup (a hero shot of the app, a product screenshot) | The loading intro on scroll: surfaces stay, contents load (A5). Then **ask the user** whether they also want stories after loading. Do not add them unasked |
| Logo rows, integrations | A marquee or a gentle light up story |
| Text only sections: headline blocks, testimonials, FAQ, pricing, CTA, footer | Not this skill. Use the page's normal scroll reveal (for example `landing-page-design` B7) |
**The hero appear.** Every website gets it, every time, even when the hero is only text.
- **The page opens plain.** The first frame is the page background alone (and the static joined surfaces of an app frame mockup, if the hero has one). No text, no header, no buttons yet.
- **A really small animation.** Each element rises just 6px and resolves from a 2px blur to sharp, with an opacity fade. Nothing slides far, nothing scales, nothing bounces. It should feel like the page settling into place, not like a show.
- **Fast and in reading order.** Header first, then the badge, the headline line by line, the subtext, the buttons, and the proof line, 50 to 70ms apart. The whole text appear lands within about 1.2s.
- **On page load, once.** It plays when the page first loads, not on scroll, and never replays when the visitor scrolls back up.
- Visuals in the hero (floating cards, a product mockup) start their own intro after the headline, following their row in the table.
Website rules:
- **Trigger with `IntersectionObserver`.** Below the hero, start each section's intro when about 30% of it is visible. Play it once. Never use a scroll listener.
- **Pause stories off screen.** Stop the clock when the section leaves the viewport and resume it on return.
- **Stagger by reading order inside the section**, never across the whole page.
- **Respect the site's system.** Use its components, tokens, radii, and fonts. Fidelity to the design still applies (A7), compared section by section.
- `prefers-reduced-motion: reduce` shows each section in its final state with no stories.
---
# PART A — Fidelity
## A1. Intake
Gather these before building. Ask only for what is missing, and ask in one batch.
- **Context.** Showcase or website (see "Two contexts"). Decide this first.
- **Source.** A Figma link with a node id is best. A screenshot or flat image works, but every layer has to be rebuilt from the pixels (see "Screenshot or flat image" in A2).
- **Layout.** Decide it yourself from the tree (A5): an **app frame** (a dashboard or app screen built from joined surfaces, such as a sidebar and a body) or **separate cards** (a bento grid, a card set, widgets). The two load differently.
- **Background.** Is there a photo or texture behind the UI? Assume it must stay exactly as designed.
- **Visuals.** Which parts are visuals that should act out a story after load (B4)? Assume every chart, list, stack, calendar, flow, prompt, photo, media control, and status indicator.
- **Deliverables.** Showcase: default to all three, MP4 for X, website GIF, 800×500 GIF. Website: the animated sections in the site's code, with exports only when asked.
- **Camera.** Assume no zoom and no pan (B7).
If the user cannot answer, make a reasonable assumption, state it in one line, and continue. On the first design of a session, show the live page before recording exports, so the direction can be corrected cheaply.
## A2. Source of truth
**Figma.** Use the REST API with a personal access token.
- Read the token from a secure store (an environment variable or the OS keychain). Never print it, echo it, paste it into chat, or commit it.
- `GET /v1/files/:key/nodes?ids=:node&geometry=paths` gives the tree, bounds, fills, effects, and radii.
- `GET /v1/images/:key?ids=:node&format=png&scale=2` renders the **reference frame**. The finished still must match this image (A7).
- Note the frame's absolute origin. Every layer position is `absolute bounds − origin`.
- The image URLs the API returns point at a CDN that sometimes resets connections. Retry every download, and check each PNG's size before using it.
### Screenshot or flat image
A screenshot has no layers, no exact values, and nothing behind what you can see. It still works, but every element has to be rebuilt or lifted out of the pixels. A3's export table is Figma only; this section replaces it. A4 to A7 and all of Part B apply as usual.
**Ask once, then continue.** In the intake batch, ask for a Figma link if one exists (it gives a better result), the highest resolution export they have (2x or 3x, PNG, uncropped, not a JPEG), and, if the design sits on a photo, the original background image. If they have none of these, continue with what you have.
**Set the stage.** Find the pixel ratio before measuring anything. Divide the image width by common frame widths (1440, 1280, 1920, 390) and pick the one that gives a whole ratio, then check it against text: UI body text is usually 14 to 18px. The stage is the image size divided by that ratio, in CSS pixels. The screenshot is the reference for A7, resized to 2x of the stage if it is a different scale.
**Measure in screenshot pixels.** Pixel `i` covers `i` to `i + 1`, so its centre is `i + 0.5`; mixing the two puts round shapes half a pixel off. At a 2x ratio many positions land on half CSS pixels. Keep them. If the still then shows elements one device pixel off, Chrome is snapping them: lay the stage out in screenshot pixels and scale it by `1 / ratio`, and scale every motion distance by the same ratio.
**Choose how each element is made**, in this order of preference. Use the first one that fits:
| Element | How |
|---|---|
| Surfaces, cards, pills, buttons, inputs, dividers, bars, skeleton lines, progress tracks | **Rebuild in CSS.** Sample each fill as the median of a flat patch, never a single pixel. Measure radii from the corner curve and borders from the edge profile. **Gradients:** sample a row of pixels along the gradient every 10 to 20px and use each sample as a stop, so a multi stop or uneven fade comes out right; when it also changes across the other axis, layer a second gradient. **Shadows:** render candidates and compare the profile of pixels across the edge with the reference, searching blur, offset, and opacity until the error stops dropping |
| Text, website | Live HTML in the site's font, as always |
| Text, showcase | Identify the font: ask, or match it by eye against common UI faces (Inter, SF Pro, Geist, Manrope, DM Sans, Satoshi, Plus Jakarta Sans). Retype it in HTML and overlay it on the reference. Overlay the HTML on the reference at 2x. The match is close when each line's width is within 1% and every baseline within one screenshot pixel; PSNR cannot judge text, since even the right font scores low on it. Keep a close match, since it stays sharp and can type or count. Otherwise lift the text out of the pixels (next row) |
| Text, icons, and glyphs on a flat or gradient surface | **Lift them out** as a transparent layer by un-blending against the surface colour you rebuilt. For single colour content: `alpha = (bg − px) / (bg − fg)` per pixel, using the channel with the largest contrast, then store `fg` with that alpha. Its edges then sit on your CSS surface without a seam. In practice: render your rebuilt surfaces first and un-blend against that render, not a guessed colour. Estimate `fg` once per text group (a heading, a paragraph, a link), not per box. Keep each box a few pixels clear of container edges and other elements, or they merge into it. Where pixels hold more than one colour (a two tone icon, colour fringes), fall back to colour to alpha against the surface |
| Simple icons | Redraw as SVG when the set is recognisable (Lucide, Phosphor, Heroicons, Material): it stays sharp at any scale. Otherwise lift them out as above |
| Lines and connectors | Trace the centerline from the pixels (the middle of the stroke in each column or row) and draw them as SVG strokes. They can then draw on (B4) without the mask trick |
| Charts | Bars as CSS with measured heights. Lines and areas as SVG paths traced per column. They can then animate |
| Photos, avatars, logos, illustrations | **Crop** from the screenshot, masked to their container's radius. These are the only rectangular crops |
| Text, badges, or icons on top of a photo | They stay inside the photo crop and move only with it. List them as not separable |
**What is hidden stays hidden.** Anything under another element (the part of a card behind an overlapping card, a list behind a dropdown, the background behind a panel) does not exist in the image. Never invent it silently.
- **Flat or gradient backgrounds** rebuild in CSS, so the empty state is exact.
- **Photo backgrounds** need the original image for any layout where cards rise in (A5), because the empty state shows what is behind them. Without it, tell the user before building and offer two choices: the parts behind the cards are filled in (inpainted, so they are guessed), or the layout is treated like an app frame, where the surfaces stay and only their contents load. Never fill it in without saying so.
- **Overlaps between elements.** Choose motion that never reveals a hidden area. If the story needs one (a card sliding off another), rebuild the lower element fully in CSS, so nothing has to be guessed.
- **Hidden parts that shape something visible** (a line that passes under a card, a tint whose edge runs underneath it): continue the simplest geometry that joins the visible ends (a straight run, or the same arc radius), and list it as guessed.
**Resolution.** A lifted layer or crop is only as sharp as the screenshot. Record exports at a scale no higher than the screenshot's own ratio wherever cropped pixels make up a large part of the frame, or rebuild more in CSS and SVG. When the screenshot is 1x, say up front that the result will be softer than a Figma build.
**Story limits.** Lifted text can type and delete (B4), but it cannot count: counters need live text in a matching font. Without one, choose another story for that visual.
**Tell the user before animating**, in a short list: what was rebuilt in CSS or SVG, what was lifted or cropped, what could not be separated, and what was guessed (the font, the pixel ratio, any hidden area). Never fake fidelity by animating the screenshot as one block, or by moving crops that carry their old background with them.
## A3. Layer export
Figma sources only. From a screenshot, use the table in "Screenshot or flat image" (A2) instead.
Export every element that will move as its own PNG at **3x** through `/v1/images`, batched 20 to 25 ids per call.
| Case | Placement |
|---|---|
| PNG size equals `absoluteRenderBounds` (text layers always do) | Place at the render bounds |
| PNG larger than the render bounds (a parent clipped it), effects that overhang evenly | `x = bbox.x − (pngW − bbox.w) / 2`. Use `renderBounds.y` when the top was not clipped, otherwise derive it from the effect radius and offset |
| Overhang that is not even (a line with an arrowhead, a stroke with one square cap) | Take the bounds of `strokeGeometry` or `fillGeometry` from the `geometry=paths` response instead of the formula |
| Rotated vectors with a large layer blur (soft colour blobs) | Export with `use_absolute_bounds=true` and place at the bounding box. Run a PSNR offset search against the reference only if that region scores below about 45 dB. Blobs can be stored at 1x; the loss is invisible |
| Zero height or zero width stroked vectors | `use_absolute_bounds=true` returns null for them. Export without it |
| Mask group with blurred content | Anchor on the edge that was not clipped (usually the bottom of the mask plus its stroke) |
| Arcs, donuts, partial ellipses | Export with `use_absolute_bounds=true` |
| Patterns or overlays far larger than their surface | Export with `use_absolute_bounds=true`, then crop to the surface rectangle |
| Instance children (ids like `I12:34;56:78`) | They often return null. Export the parent instance |
| Lines that should draw on, dashed or not | Figma outlines strokes into filled shapes, so there is no centerline to animate. Write the centerline yourself and use it as a mask over the exported PNG (example below) |
| A photo baked inside a larger exported layer | Export the photo node on its own as well. Cover the baked photo with a skeleton, and put the separate photo layer on top for the `photo` resolve. At rest it must equal the reference |
Rules that keep the frame exact:
- **Text stays an exported layer in a showcase.** Never retype it in HTML there: fonts, kerning, and line metrics will not match. On a website, text is live HTML (see "Two contexts"). From a screenshot, there is no exported layer; follow the text rows in A2.
- **Keep Figma's z order.** Static layers can sit between animated ones in the same order the tree has them.
- **Frame strokes usually draw above children.** Render a card's stroke as a separate overlay above its clipped content, then confirm against the reference: a glow inside the card can tint the stroke in Figma's render.
- **Containers whose children move on their own.** The API always exports a frame together with its children, so exporting a card or panel bakes in everything inside it. When its children must load or act separately, rebuild the container in CSS from the node data: fills, corner radii, inside strokes (including `individualStrokeWeights`), and effects. Then export each child separately.
- **Shadow mapping.** A Figma drop shadow with blur `R` is a CSS `box-shadow` with blur `R` on a single element, or `filter: drop-shadow()` with blur about `R / 2` on a group. Both give the same Gaussian. Verify against the reference.
- **A group shadow is the shadow of the union.** When a drop shadow sits on a group of joined surfaces (an app frame), put all surface shapes in one static container with `filter: drop-shadow()`. Per element `box-shadow` would darken neighbours where surfaces overlap. Separate cards each carry their own shadow inside their `card` unit, so the shadow moves with the card.
- **Skip hidden layers** (`visible: false`) and stray layers buried under opaque shapes.
**Drawing a line on.** Read the corner points and arc radii from the outline in `strokeGeometry`: the centerline sits halfway across the stroke width, and a rounded corner's centerline radius is the outline's inner radius plus half the stroke. Most UI connectors are straight runs and arcs, so the path is short:
```html
<svg class="ly" viewBox="0 0 1440 990" style="left:0;top:0;width:1440px;height:990px">
<mask id="draw1">
<path d="M193 832 V700 A45 45 0 0 1 238 655 H380" fill="none" stroke="#fff" stroke-width="8"
pathLength="1" stroke-dasharray="1" stroke-dashoffset="1"/>
</mask>
<image href="data:image/png;base64,..." x="192" y="653" width="190" height="181" mask="url(#draw1)"/>
</svg>
```
Animate `stroke-dashoffset` from 1 to 0 on the JS clock. `pathLength="1"` means no length measuring, and the wide mask stroke covers the line's antialiasing. For pulses that travel along it, read positions with `getPointAtLength` on the same path.
## A4. Background (sacred)
When the design sits on a photo or texture, the background is part of the design, not decoration. Often the whole canvas outside the app frame is background.
- **It never changes.** Not in the intro, not in the loop, not in the dissolve, not in any zoom. It never moves, blurs, scales, fades, or recolours.
- **Every version keeps it.** A "loading only" or "no zoom" variant is still the same design on the same background. Never drop the photo to make a variant simpler.
- **Export the original image, not a render.** `GET /v1/files/:key/images` returns the raw image fills. Apply the fill's scale mode and `imageTransform` as CSS: for a stretch fill with a transform, `background-size` is the frame size divided by the transform scale, and `background-position` is the negative offset.
- **Verify it.** Compare the background region of your still against the reference. Aim above 45 dB PSNR. A crop or offset error shows up instantly.
- **Frosted panels must see the photo.** A surface with `backdrop-filter: blur()` is its own element, a sibling above the background, never inside an ancestor that has `filter` or `opacity` below 1. Headless Chrome only renders it with `transform: translateZ(0)` and a `z-index` on that element.
- **If you cannot reproduce it, say so before building.** No image access, a generated texture, a missing fill: tell the user and ask. Never swap in a flat colour silently.
- Store photos as high quality JPEG or WebP, not PNG.
## A5. Layout: app frame or separate cards
Decide which of the two layouts the design is. It changes what the empty state contains and what moves.
**App frame (joined surfaces).** A dashboard or app screen whose frame is built from two or more surfaces joined into one unit: a sidebar and a body, often overlapping by a few pixels. Only this layout gets static surfaces.
- **The surfaces exist in the empty state.** The sidebar and body are in place, fully opaque, and still from the first frame. They never fade, slide, scale, or blur in. Only the elements inside them load.
- **Keep Figma's stacking where they meet.** The body sits above the sidebar's content clip, so sidebar content can never draw over the body, and the body never slides over the sidebar.
- Cards inside the body are content: they load like any other element.
**Separate cards (bento, card sets, widgets).** Cards that stand apart from each other with gaps between them. These are **not** joined surfaces.
- **The cards themselves load in.** Each card rises in with blur (the `card` kind in B2), staggered in reading order, and its contents follow inside it.
- The empty state is the background alone.
**Both layouts:**
- **Each container clips its own contents** to its exact shape, including per corner radii. Nothing may overflow onto a neighbour or the background.
- **Image shaped surfaces.** When a container's silhouette is a photo (a cover header, a full bleed card image), give it a placeholder in the image's average colour. The photo then loads into it.
- **Nested content is content.** Trays, toolbars, and inner panels load like any other element.
Clip pattern, which keeps stage coordinates valid inside the clip. For separate cards, the card's unit wraps its clip, so the card and its contents move together:
```html
<div class="clip" style="left:113px;top:138px;width:305px;height:907px;border-radius:16px 0 0 16px">
<div class="cin" style="left:-113px;top:-138px"><!-- units in stage coordinates --></div>
</div>
```
```css
.clip { position: absolute; overflow: hidden; isolation: isolate; }
.cin { position: absolute; width: var(--stage-w); height: var(--stage-h); }
```
## A6. Page architecture (showcase)
On a website, build inside the site's code instead, following the website rules in "Two contexts". The clock, units, and modes below still apply per section.
- One self contained HTML file: a fixed size stage at the frame's exact size, scaled to fit the viewport. Images inline as base64, deduplicated when the same image repeats. Wait for decode on `<img>` elements only; CSS gradients are not images.
- **Modes:** `?still` renders the exact Figma frame with no motion (also used for reduced motion). `?loop` repeats the cycle like the exports. `?capture` turns off `requestAnimationFrame` and exposes `window.__start()`, `window.__tick(dt)`, and the loop time `window.__lt`, so the recorder drives the clock (C1).
- **Units.** Every animated element is wrapped in a full stage layer `.u` carrying its delay `--d`. The intro is CSS transitions keyed on `.stage.in`. Because a unit covers the whole stage, any percentage in `clip-path` or `transform-origin` on it refers to the stage, not the element. Use pixel values computed from the element's rectangle.
- **Static layers stay composited.** Give clips and stroke overlays `transform: translateZ(0)`, so their antialiasing does not change when nearby transitions start. Otherwise a 1px edge flickers at every cycle start.
- **One JS clock** (`requestAnimationFrame`) drives everything time based: masks, sweeps, stories, accents. Drive it from loop time, never from wall clock, so capture is deterministic. In `?capture` the clock advances only through `__tick`.
- Default page behaviour: wait for image decode, play the intro once (when the frame scrolls into view, if it sits on a longer page), then keep the stories running.
## A7. Verify the still
Render `?still` at 2x and compare it with the reference before any motion work.
- PSNR for the whole frame and for each container, after a light blur (`gblur sigma≈1.2`) so sub pixel antialiasing does not dominate. Aim above 35 dB overall and above 30 dB per container. Text heavy containers sit near 30 dB because 3x layers are resampled to 2x; if one is lower, retest it at `sigma≈2.5`, where text edges stop counting and only structure remains.
- Look at a blurred, amplified difference image. It reveals structural errors: a glow placed too high, wrong stacking, a missing stroke, a shifted shadow.
- **Screenshot sources: also score the surfaces alone.** Lifted layers carry the surface colour inside their boxes, so they hide errors in the rebuilt surface beneath them and inflate the score. Mask out the lifted and cropped regions and score the rest; it must pass the same thresholds.
- **Do not chase sub pixel offsets.** Measuring at 2x cannot resolve errors under half a pixel, and "corrections" overshoot. Fix structure, not antialiasing.
---
# PART B — Motion system
Every timing, distance, and curve below comes from the values in **Make it yours**. Never invent ad hoc values.
## B1. Start empty
The first frame of every page load and every export is the **empty state**. Empty becomes loaded. Never open on the finished frame.
- **App frame:** background plus the static joined surfaces, nothing else.
- **Separate cards:** the background alone.
## B2. Loading choreography
The appear animation is smooth, slow, and soft: elements **rise from below and resolve from blur to sharp**, staggered.
| Kind | Use for | From |
|---|---|---|
| `card` | Separate cards (bento, card sets) as a whole, with their shadow | `translateY(24px)`, `scale(0.985)`, `blur(6px)`, opacity 0 |
| `up` | Text, headers, values, rows | `translateY(10px)`, `blur(4px)`, opacity 0 |
| `down` | Top toolbars, top bars | `translateY(-8px)`, `blur(4px)` |
| `left` | Sidebar items, list rows, labels | `translateX(-10px)`, `blur(4px)` |
| `pop` | Icons, badges, avatars, buttons, dots | `scale(0.82–0.88)` from the element's own center, `blur(4px)` |
| `photo` | Images | skeleton shimmer first, then `blur(14px) saturate(0.6)` to sharp. For a photo baked into a bigger layer, see A3 |
| `wipe` | Bars, fills, highlights | A left to right `clip-path` reveal in pixels on the full stage unit (A6). The right inset starts at `stageW − x` (zero width, so no sliver shows) and ends at `stageW − (x + w)` (the element fully shown). Top and bottom insets stay at `y` and `stageH − (y + h)` |
| `line` / `grow` | Rules, ticks, timelines | `scaleX(0)` / `scaleY(0)` from their start edge |
| `donut` | Rings, gauges | conic mask sweeping clockwise from 12 o'clock |
| `tray` / `rise` | Sheets, trays, folders | slide up 40px from inside the container's bottom edge, clipped by it |
| `fade` | Layers that sit under another layer | opacity only |
- **Order.** Containers load in reading order, 80 to 90ms apart: for an app frame, the regions inside its static surfaces; for separate cards, the cards themselves, each starting about 0.15s before its own contents. Inside a container: header, then labels, then values, then visuals. Items in a group stagger 30 to 80ms.
- **Never `scale(0)` on an object.** Only lines and bars grow from zero, because they draw.
- **Covered layers arrive last and leave first.** Anything hidden under another layer in the final frame (calendar weeks under a meeting tray) appears after its cover lands and exits faster in the dissolve, so it never ghosts through.
- **Skeletons match the real shape** and sit 1px inside it, so no halo shows around the loaded image.
- Total intro: about 2 to 2.5 seconds for a full frame.
## B3. Bars fill like progress
- **Data bars, meters, and highlights fill like progress bars**: a left to right `clip-path` wipe with the in out curve, 0.7 to 1.1s.
- **Never add loading lines.** No progress line along a card's or surface's top edge, and no other bar or rule that is not in the design. Only shapes that exist in the design animate.
## B4. Story loops (the main act)
The intro is only the opening. The main act is every visual **acting out what it does**, on a loop: a lead list receives new leads, a chart is being read, a calendar finds an open slot, a prompt gets typed. When a user says "animate the visuals", this is what they mean. A frame that only loads in and then sits there with a few pulses is not finished.
**Write the story first.** For each visual, name its story in one sentence before building, for example "a new lead lands on top and the older ones settle back". Pick from this table, or invent one in the same spirit.
| Visual | Story |
|---|---|
| Stack of items (leads, notifications, files) | A new item lands on top with a blur, the others step back one slot, the last one leaves |
| Line or area chart | A scrubber glides across, dots ride the curves, the tooltip value counts. Or: the line redraws, a marker pops, the numbers count up with it |
| Bar chart, equalizer, grid of cells | Bars breathe like a...
© elayadesign · MIT · huytran1120/vie-agentic-skills