Skip to main content
AI & UI5 min readNovember 2026

How do I install Framer Motion and add animations with Claude Code?

Short answer

Claude Code can run commands in your project, so ask it directly: "install motion and add a fade-in to the hero section". It will run npm install motion and edit your components. For designed, multi-state animations, connect an animation tool through MCP so Claude Code can create and edit animation files instead of hand-writing every keyframe.

Core Takeaway

  • Claude Code can run npm install motion for you
  • Be specific: element, effect, duration, and reduced-motion behaviour
  • Motion (formerly Framer Motion) imports from "motion/react"
  • MCP servers let Claude Code edit animation files in design tools
  • Always review motion on a real device; AI cannot feel timing

"How to install Framer Motion in Claude Code" started appearing in Google suggestions in 2026, a sign of how many people now build front ends with AI agents.

Install and use Motion

In Claude Code, describe the result you want. For example: "Install the motion package. In components/Hero.tsx, fade and slide up the heading on load, 300 ms, ease-out. Skip the animation when prefers-reduced-motion is set." Claude Code will run the install, import from motion/react and edit the file. Review the diff before accepting.

import { motion, useReducedMotion } from 'motion/react';

const reduce = useReducedMotion();
<motion.h1
  initial={reduce ? false : { opacity: 0, y: 16 }}
  animate={{ opacity: 1, y: 0 }}
  transition={{ duration: 0.3, ease: 'easeOut' }}
/>

Prompts that work better

Name the element and file. Give numbers (duration, distance, spring stiffness). Say what triggers it. Ask for reduced-motion handling. Ask it to keep animations on transform and opacity.

For designed, multi-state motion: MCP

Hand-written keyframes get messy for loaders with several states, onboarding flows or mascots. Tools with an MCP server let Claude Code create and edit animation files directly. ExodeUI has an MCP server, so Claude Code, Cursor and similar tools can build and change animations from plain-language prompts, and you can open the result in the visual editor. Rive offers a CLI and agent for its files. We make ExodeUI; it is not affiliated with Anthropic.

Frequently asked questions

Can Claude Code make Lottie animations?

It can write or edit Lottie JSON, but results for anything complex are unreliable. A design tool with an MCP server gives better control.

Should I install framer-motion or motion?

Install motion. framer-motion is the old package name for the same library.

Can Claude do motion design?

It can implement motion you describe and suggest values. Judging how it feels is still your job.

Is ExodeUI made by Anthropic?

No. ExodeUI is an independent product with an MCP server that works with Claude Code and other tools.

Related Guides & Examples

Connect Claude Code to ExodeUI

Set up the ExodeUI MCP server and create animations from prompts.

Set up MCP
ExodeUI

EXODEUI DESKTOP

A little space for good ideas.

Choose your platform to get the official ExodeUI installer.

Looking for Intel Mac or other builds? Explore the web studio or check all download options.

Prefer the browser? Try for free in your browser →