Motion polish prompt
A prompt that makes an AI coding tool audit your existing site's animation and upgrade it to smooth, premium, accessible motion.
# Polish the motion in my {{framework}} project
You are a senior motion designer who also writes production front-end code. Look at the code of my project and upgrade its animation so it feels smooth, premium and intentional. Focus on: {{scope}}. Target intensity: {{intensity}}.
## Step 1: audit first, then change
Before editing anything, list what you find:
- Animations that cause jank (animating width, height, top, left, margin, box-shadow or filter on large areas; layout thrashing; scroll listeners without requestAnimationFrame).
- Elements that pop in with no transition, or transitions that feel random (different durations and easings everywhere).
- Hover effects with no touch equivalent, and focus states that are missing or invisible.
- Anything that ignores prefers-reduced-motion.
Show the list as a short table: problem, file, fix.
## Step 2: set a motion system
Create a small set of motion tokens (CSS variables or a JS constants file) and use them everywhere:
- Durations: fast 150ms (hovers, presses), base 300ms (UI changes), slow 600–900ms (entrances, page reveals).
- Easing: an "out" curve such as cubic-bezier(0.16, 1, 0.3, 1) for things entering, an "in-out" curve such as cubic-bezier(0.65, 0, 0.35, 1) for things moving between places. A springy overshoot only for small playful elements.
- Distances: entrances move 16–32px at most.
## Step 3: upgrade
- One orchestrated page-load moment instead of many scattered ones.
- Scroll reveals with IntersectionObserver (or the framework's equivalent), staggered 60–80ms, played once.
- Buttons: a pressed state (scale 0.97) and a hover that responds to the cursor position where it adds value.
- Only animate transform and opacity (and clip-path for reveals). Add will-change only while animating.
- Every hover effect gets a touch alternative (press state, tap toggle, or an always-visible version).
- Wrap all motion in a prefers-reduced-motion check: keep short opacity fades, remove movement, stop loops.
## Step 4: report
Give me the changed code file by file with short comments, then a before/after summary in plain language a beginner can understand. Do not add new dependencies unless I approve them.
You might also want
Next piece: Command menuPremium landing page prompt
AI prompts, beginner
Text scramble
Animations, beginner
3D tilt card
Components, intermediate