Prompts that get good motion from your coding agent

Seven copyable prompt cards for buttons, page entrances, lists, reduced motion and motion audits, and why vague words like "smooth" get you generic animation.

Updated 8 min readpromptsanimationclaude-codecursorvibe-coding

Tested 28 October 2026 with Claude Code 2.1.312 with Claude Haiku, Chromium 153On this page: 1 live demo

The short answer

  1. Name the moment, not the mood: what the visitor did, what should answer, and when it stops.
  2. Give numbers: durations (UI answers in 150 to 300 ms), an easing that starts fast and settles, and what may move (transform and opacity only).
  3. Say what must not happen: no layout shift, nothing hidden while it waits to animate, no motion on load beyond one entrance.
  4. Ask for the reduced-motion version in the same prompt.
  5. If a component catalog is connected, tell the agent to search it and install a finished piece before it writes motion by hand.

"Make it smooth and modern" is the motion version of "make it pop": the agent has to guess, and it guesses the most common answer, usually a fade-up on everything. The cards below replace adjectives with decisions an agent can follow and you can check. Copy one, change the bracketed parts, paste it into Claude Code, Cursor, Codex, Grok or any other agent.

Live demoBuild a prompt card

The live demo loads here when scripts run. The text below says what it shows.

Pick what moves, how it should feel and whether a component catalog is connected. The card follows the rules table below (the moment, numbers, what must not happen, the reduced-motion version) and copies with one press. Change the words in [brackets] to your own. Nothing is sent anywhere.

The rules behind every card

Say Instead of Why
"answers within 100 ms, settles by 300 ms" "fast" numbers can be checked
"starts fast and slows into place (ease-out)" "smooth" the easing is most of the feel
"transform and opacity only" nothing anything else repaints or moves the layout and stutters
"plays once, on arrival" "animated hero" stops it replaying on every scroll
"with reduced motion: [what instead]" nothing otherwise it is forgotten
Prompt card1 · Set the house rules first
Before you add any animation to this project, write these rules into the project's agent instructions (CLAUDE.md, AGENTS.md or .cursor/rules) and follow them from now on:
- Durations: 150 ms for small state changes, 200 to 300 ms for things entering or leaving, up to 500 ms for one page entrance. Nothing longer unless I ask.
- Easing: ease-out (fast start, gentle stop) for things arriving, ease-in for things leaving, never linear except for spinners and progress.
- Animate transform and opacity only. Never animate width, height, top, left, margin or box-shadow on a large area.
- Nothing moves on page load except one entrance that plays once. No scroll-triggered fade-ups on every section.
- Every animation has a prefers-reduced-motion version: keep the state change, drop the travel.
- Put durations and easings in CSS variables and reuse them; no one-off values.
Reply with the rules as you wrote them.

Do this once per project and every later prompt gets shorter.

Prompt card2 · A button that confirms
The [Save] button needs to confirm what it did. When pressed it presses down slightly (about 97 % size, 100 ms). If saving takes longer than 300 ms, show a small spinner inside the button and keep the button's width fixed so nothing around it moves. When the save finishes, show "Saved" with a check for about 1.5 seconds, then go back to the normal label. If it fails, say so in words and offer Retry. Use only transform and opacity for the motion, use the colour variables the site already has, and honour prefers-reduced-motion (no scaling then, just the state change). If a component catalog is connected (an MCP server), search it for a press, loading and toast piece and install that instead of hand-building. Tell me what you changed and what you could not do.

The 300 ms rule is the important line: a spinner that flashes on a fast save is worse than none.

Prompt card3 · A page that settles once
Add one entrance to [the hero]: the navigation, then the headline, then the buttons settle into place in that order, each moving up no more than 12 px and fading in, 60 to 80 ms apart, the whole thing done within 700 ms. It plays once per visit, on load, never again on scroll. The text must be readable and clickable from the first frame for anyone without JavaScript, and with reduced motion it simply appears. Do not animate anything else on the page.

"Readable from the first frame" stops the common bug where content stays invisible until a script runs.

Prompt card4 · A list that keeps its place
When the [task list] is sorted or filtered, rows that stay should slide to their new positions (FLIP: measure, move, animate the transform) over about 250 ms with ease-out; rows that leave fade out in 150 ms; new rows fade in after the others have moved. Keyboard focus must stay on the same row it was on. With reduced motion, rows change place instantly. Do not animate height or top.
Prompt card5 · Make an existing site respect reduced motion
Audit every animation and transition in this project (CSS, JS and any animation library). For each, list file:line, what moves, and whether it respects prefers-reduced-motion. Then fix them: under reduced motion keep fades and colour changes, remove movement, scaling, parallax and auto-playing loops, and make sure no content stays hidden waiting for an animation. Show me the list before and after.
Prompt card6 · Find the motion to cut
Look at every animation on [the home page] and rank them by whether they help the visitor (confirm an action, show where something went, explain a change) or only decorate. Recommend which to remove. Also flag anything that animates layout properties, anything longer than 500 ms, anything that plays on scroll more than once, and anything that loops without a pause control. Do not change code yet.

Agents are good critics when you give them criteria. This one usually removes more than it adds, which is the point.

Prompt card7 · Use a finished piece before hand-building
I want [a toast stack in the bottom right that says "Copied" for 2 seconds]. First search the connected component catalog for it and show me the top three matches with what each does. If one fits, install it with its own install recipe, set it up with our colours, and tell me how it differs from what I asked. Only build it by hand if nothing fits, and say so.

Without the first sentence, agents often build a look-alike even when the right piece is one call away: in our own agent tests, that was the most common miss in the first round.

What we saw when we ran card 2

We ran card 2, word for word, through a small model (Claude Haiku) in Claude Code, on a plain three-file page with a component catalog connected over MCP (our own, Clinamen's local server, which opens to the public at launch). In 39 turns it searched the catalog, installed the press-and-toast piece with the catalog's own install line, set the press to 97 % for 100 ms, the spinner delay to 300 ms and the "Saved" hold to 1.5 s, and added a Retry line. Then it said what it had not checked: it had not opened a browser, and the piece keeps a spinner up for at least 400 ms once shown, which it offered to lower.

We opened it in a browser: the button pressed to 97 %, showed "Saving" with a spinner, then "Saved" with a check, never changed width, and did not scale at all with reduced motion on. That last paragraph of its answer is the part to ask for every time: an agent that tells you what it did not verify saves you finding it later.

Something here did not work?

Every command on this page was run before it was published, on the systems named in "How we tested this". If a step fails for you, write to [email protected] with what you ran and what you saw, and we will fix the page.