TL;DR
- Claude generates functional but static UI by default
- Give it a structured motion prompt and it produces spring-based Framer Motion animations
- Best for projects where you want full control via Claude Code or Claude Projects
You asked Claude to build your UI and it delivered — clean layout, solid component structure, correct Tailwind classes. But then you click around and everything just... sits there. No transitions, no hover feedback, no entrance animations. The app works, but it doesn't *feel* like anything.
This is the default Claude experience. Claude animations are functional but lifeless unless you give it structured motion instructions. This guide shows you exactly how to fix that.
Why Claude defaults to basic CSS transitions
Claude is trained to prioritize correctness. When you ask for a component, it focuses on:
Animation is treated as a nice-to-have. If you ask for "a card with a hover effect," Claude gives you something like this:
.card {
transition: transform 0.2s ease;
}
.card:hover {
transform: scale(1.02);
}Technically correct. Visually boring. There's no spring physics, no coordinated easing, no stagger timing. It's a checkbox animation — present but not designed.
The problem: generic animation prompts get generic results
Most developers try something like this:
"Add smooth animations to my dashboard components"Claude responds with scattered transition: all 0.3s ease declarations and maybe an opacity fade on mount. The animations don't relate to each other. Some components use CSS transitions, others get Framer Motion — no consistency.
The issue isn't Claude's capability. Claude *can* generate sophisticated Framer Motion code with spring physics, staggered children, AnimatePresence exit animations, and gesture interactions. It just needs the right instructions.
The solution: structured motion prompts
A motion prompt is a markdown file that gives Claude a complete animation specification. Instead of vague requests, you provide:
This is what Claude needs to generate coordinated, professional motion instead of random fade-ins.
Step-by-step: Using motion prompts in Claude Projects
Claude Projects let you add persistent context that applies to every conversation. This is the best way to use motion prompts with Claude.
1. Open your Claude Project
Go to claude.ai, open your project (or create one for your app).
2. Add the motion prompt as Project Knowledge
Click the knowledge icon and upload your motion prompt markdown file. Claude now has the animation specification available in every conversation within this project.
3. Build your component normally
"Build a pricing card grid with 3 tiers: Starter, Pro, Enterprise.
Each card has a title, price, feature list, and CTA button.
Use Tailwind CSS and Framer Motion."4. Claude generates animated code automatically
Because the motion prompt is in the project context, Claude applies the animation rules without you asking. The output includes:
import { motion } from "framer-motion";
const cardVariants = {
hidden: { opacity: 0, y: 30 },
visible: (i: number) => ({
opacity: 1,
y: 0,
transition: {
delay: i * 0.1,
type: "spring",
damping: 25,
stiffness: 250,
},
}),
};
const hoverVariants = {
rest: { scale: 1, y: 0, boxShadow: "0 1px 3px rgba(0,0,0,0.08)" },
hover: {
scale: 1.02,
y: -4,
boxShadow: "0 12px 32px rgba(0,0,0,0.12)",
transition: { type: "spring", damping: 20, stiffness: 300 },
},
};
export function PricingCard({ tier, index }: Props) {
return (
<motion.div
custom={index}
variants={cardVariants}
initial="hidden"
animate="visible"
whileHover="hover"
className="rounded-2xl border bg-white p-8"
>
<motion.div variants={hoverVariants} initial="rest" whileHover="hover">
<h3 className="text-lg font-semibold">{tier.name}</h3>
<p className="mt-2 text-3xl font-bold">{tier.price}</p>
<ul className="mt-6 space-y-3">
{tier.features.map((feature, i) => (
<motion.li
key={feature}
initial={{ opacity: 0, x: -10 }}
animate={{ opacity: 1, x: 0 }}
transition={{ delay: index * 0.1 + i * 0.05 }}
>
{feature}
</motion.li>
))}
</ul>
<motion.button
whileHover={{ scale: 1.04 }}
whileTap={{ scale: 0.97 }}
transition={{ type: "spring", damping: 15, stiffness: 400 }}
className="mt-8 w-full rounded-lg bg-black py-3 text-white"
>
Get started
</motion.button>
</motion.div>
</motion.div>
);
}Notice the difference: spring physics on hover, staggered entrance with delay based on index, coordinated feature list animation, button press feedback with whileTap. This is what Claude generates when it has a motion prompt — not generic fade-ins.
Step-by-step: Using motion prompts in Claude Code
If you use Claude Code (the CLI tool), the workflow is slightly different.
1. Add the motion prompt to your project
Save the prompt file in your repo, for example at prompts/motion.md or in your .claude/ directory.
2. Reference it in your CLAUDE.md
Add a line to your project's CLAUDE.md file:
## Animation Guidelines
Follow the motion specification in prompts/motion.md for all UI animations.
Use Framer Motion. Apply spring physics for interactions. Stagger list children.3. Ask Claude Code to build components
claude "Build a notification toast component with enter/exit animations
following our motion guidelines"Claude Code reads the motion prompt from your project context and generates animations that match the specification.
Before/after: the real difference
Without motion prompt — Claude's default output:
// Generic hover
<div className="transition-transform hover:scale-105 duration-200">
<button className="transition-colors hover:bg-blue-600">
Click me
</button>
</div>With motion prompt — Claude's guided output:
// Spring-based hover with coordinated feedback
<motion.div
whileHover={{ scale: 1.02, y: -2 }}
transition={{ type: "spring", damping: 20, stiffness: 300 }}
>
<motion.button
whileHover={{
scale: 1.04,
backgroundColor: "#2563eb",
transition: { duration: 0.15 }
}}
whileTap={{
scale: 0.97,
transition: { type: "spring", damping: 15, stiffness: 400 }
}}
>
Click me
</motion.button>
</motion.div>The second version has spring physics that overshoot slightly and settle naturally. The button press (whileTap) gives tactile feedback. The parent and child animate independently but feel coordinated.
Free sample prompt: button hover with spring physics
Try this structured prompt in Claude to see the difference immediately:
## Button Hover Interaction Spec
**Library**: Framer Motion
**Component**: Primary action button
### Hover state
- Scale: 1.04 (subtle lift)
- Y offset: -1px
- Box shadow: elevate from 0 2px 4px to 0 8px 20px
- Transition: spring, damping: 18, stiffness: 350
- Background: lighten by 5%
### Tap/press state
- Scale: 0.97 (physical press feel)
- Y offset: 0px (press down)
- Box shadow: reduce to 0 1px 2px
- Transition: spring, damping: 12, stiffness: 500
### Focus visible
- Ring: 2px offset, spring scale 1.02
- Transition: spring, damping: 25, stiffness: 200
### Reduced motion
- Replace spring animations with opacity transitions
- Duration: 150ms
- No scale or transform changesPaste this into Claude and ask it to build a button component. Compare the result with what you get from "make a button with a hover animation."
Why "Claude animations" is exploding as a search term
Google Trends shows "Claude animations" going from essentially zero search volume to a breakout term in early 2026. This tracks with Claude's surge in adoption for code generation — more people building with Claude means more people hitting the animation quality gap.
The pattern is consistent across AI coding tools: developers discover that functional code is easy to generate but polished, animated UI requires different prompting techniques. Claude animations become a bottleneck specifically because Claude is so good at everything else — the static output stands out more.
Making Claude animations production-ready
A few additional tips for getting the best Claude animation output:
Specify the interaction completely. Don't just say "hover animation" — say "hover with scale, lift, shadow elevation, and child text color change."
Include exit animations. Claude often forgets AnimatePresence. Explicitly ask for enter/exit pairs.
Request reduced motion support. Add "include prefers-reduced-motion media query fallback" to your prompts. This is an accessibility requirement Claude will implement well when asked.
Ask for variants, not inline values. Claude generates cleaner code when you request Framer Motion variants objects rather than inline animation props.
You can also check out the Cursor + Claude animation workflow for a combined approach that uses Cursor for editing and Claude for generation.
When to use CSS vs Framer Motion with Claude
For simple transitions (color changes, opacity), CSS is fine. For anything involving spring physics, stagger patterns, gesture interactions, or enter/exit animations, tell Claude to use Framer Motion explicitly. See our detailed comparison for more on this decision.
If you're new to the concept of motion prompts in general, read What Are UI Motion Prompts? for background on how they work and why they exist.
Stop fighting with generic Claude animations. UI Motion Prompts gives Claude the animation expertise it needs to generate production-quality motion on every component. Browse the prompt library and start shipping polished UI today.
More articles
How to Build a Smooth UI with AI Prompts
Practical guide on what makes a UI feel smooth (timing, easing, springs, reduced motion), why AI tools default to janky transitions, and how structured motion prompts solve this.
CSS Animations Are Dead — Here's What Replaced Them
Why CSS animations are declining (-40%) as AI coding tools take over, what's replacing them (Framer Motion via AI prompts), and why you should stop hand-coding @keyframes.