motiondivision / motion

A modern animation library for React and JavaScript
https://motion.dev
MIT License
25.67k stars 843 forks source link

[BUG] Can't use className for example in motion.div component #2843

Closed FarzadMohtasham closed 4 weeks ago

FarzadMohtasham commented 4 weeks ago

Describe the bug

Hi, I'm using framer-motion lib in my NextJS project, and recently I noticed that I can't use attribute className in motion.div components and of course in others like motion.span and so on...

image image image

Tools version:

react: v19.0.0-rc-69d4b800-20241021 next.js: v15.0.1 framer-motion: v11.11.9 clsx: v2.1.1 eslint: v9.13.0 eslint-config-next: v15.0.1

Maginobion commented 4 weeks ago

The version that supports React 19 is still on alpha Try using framer-motion: 12.0.0-alpha.1

FarzadMohtasham commented 4 weeks ago

Thanks, Problem fixed.