Relative Content

Tag Archive for animationfrontendframer-motion

movement of pointer inside the card

“use client”; import { AnimatePresence, motion, useMotionValue } from “framer-motion”; import React, { useEffect } from “react”; import clsx from “clsx”; const PointerCard = ({ title }: { title: string }) => { const x = useMotionValue(0); const y = useMotionValue(0); const ref = React.useRef<HTMLDivElement>(null); const [rect, setRect] = React.useState<DOMRect | null>(null); const [isInside, setIsInside] […]