Skip to main content
Motion & React4 min readNovember 2026

Does Framer Motion work with React 19 and Next.js?

Short answer

Yes. Current versions of Motion list React 18 and 19 as supported peer dependencies (version 14.10 in November 2026), and Motion supports both the Next.js Pages and App Routers. In the App Router, add "use client" to files that use motion components, or import from "motion/react-client" in server components. Most React 19 errors go away after upgrading.

Core Takeaway

  • motion 14.x peer dependencies: React ^18 || ^19
  • Upgrade first; several React 19 issues were fixed in early 2026
  • App Router: "use client" or motion/react-client
  • Page exit transitions are harder in the App Router
  • Old create-react-app setups caused import errors in v5

The motion GitHub repo had several React 19 issues in 2025, including ref cleanup and Reorder types, which were closed in January 2026. If you see type errors or ref warnings, upgrade the motion package before anything else.

Next.js App Router

'use client';
import { motion } from 'motion/react';

export function Card() {
  return <motion.div whileHover={{ y: -4 }} />;
}

Or, to keep a file as a server component and send less JavaScript:

import * as motion from 'motion/react-client';

export default function Page() {
  return <motion.h1 initial={{ opacity: 0 }} animate={{ opacity: 1 }}>Hello</motion.h1>;
}

Shared layout and page transitions

A popular GitHub issue was "Can't get shared layout animations to work with Next.js 13". The App Router keeps layouts mounted and swaps segments, so exit animations between pages and layoutId across routes need care. Many teams animate inside pages instead, or use the browser View Transitions API.

The old "Can't import the named export Children" error

That error came from Framer Motion 5 with older create-react-app setups. It is a build tool problem, not React 19. Move to a current bundler such as Vite or Next.js.

Frequently asked questions

Can motion components be server components?

They run in the browser. motion/react-client lets you use them from a server component file without marking it use client.

Why do I get a hydration warning?

Usually because initial styles differ between server and client. Use initial values that match the server render, or initial={false}.

Does Motion support React Server Components fully?

Animation runs on the client. Motion provides the react-client import to fit into RSC apps.

Is there a lighter way to load Motion?

Yes. LazyMotion with the m component loads features on demand.

Related Guides & Examples

Runtime animation in Next.js

See how ExodeUI files run inside client components with inputs from your app.

Read the guide
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 →