Relative Content

Tag Archive for reactjsframer-motionnextjs14

framer motion whileHover is not applied in the component that returns a image element in nextjs

import React from ‘react’ import { motion } from ‘framer-motion’ const Card = ({ classValue, image, index, midIndex }: { classValue: string, image: string, index: number, midIndex: number }) => { return ( <motion.img className={classValue} src={image} alt=”card” key={index} initial={{ position: “absolute”, height: “100%”, transformOrigin: “50% 100%”, transform: `translateX(${(index – midIndex) * 2.5}rem) rotate(${(index – midIndex) […]