need help with framer motion on reactjs

Code :
import { motion } from 'framer-motion';

<motion.img
initial={{ opacity: 1 }}
whileHover={{ opacity: 0.8 }}
src="your-image-url.jpg"
alt="Description"
/>

import { motion } from 'framer-motion';

<motion.img
initial={{ opacity: 1 }}
whileHover={{ opacity: 0.8 }}
src="your-image-url.jpg"
alt="Description"
/>

So the error is "failed to execute 'animate' on 'element' duration must be non-negative or auto" Typeerror I don't even include Duration but the error is keep showing whenever I hover that img
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server