You’ve heard of whileHover
? Here’s whileTap
.
export function Example() {
return (
<motion.div
style={{
width: 150,
height: 150,
borderRadius: 30,
backgroundColor: "#fff",
cursor: "pointer"
}}
whileTap={{ rotate: 90, scale: 0.75 }}
/>
);
}