Created
November 26, 2025 13:27
-
-
Save divv919/6b38a8631d23ae984982b00acd21cdf7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "use client"; | |
| import { ExternalLink } from "lucide-react"; | |
| import { motion } from "motion/react"; | |
| import Image from "next/image"; | |
| export default function BookHover() { | |
| return ( | |
| <motion.div | |
| whileHover={{ | |
| transform: "rotateY(-35deg) translateZ(20px) translateX(85px)", | |
| }} | |
| transition={{ | |
| duration: 0.6, | |
| ease: [0.3, 0.59, 0.2, 1.1], | |
| }} | |
| animate={{ | |
| transform: "rotateY(0deg) translateZ(20px) translateX(85px)", | |
| }} | |
| style={{ | |
| transformStyle: "preserve-3d", | |
| perspective: "5000px", | |
| }} | |
| className="bg-red-50 w-50 h-60 cursor-pointer relative" | |
| > | |
| <div className="w-50 h-60 bg-[#fff42b] absolute left-0 rounded-[3px] overflow-hidden"> | |
| <div className="absolute right-0 translate-x-[78%] bottom-0 translate-y-[58%] aspect-video w-220 opacity-100 "> | |
| <Image | |
| src="/framer-motion/image.png" | |
| alt="dot pattern" | |
| fill | |
| className="object-cover filter invert object-right mask-radial mask-radial-from-0% mask-radial-to-80%" | |
| /> | |
| </div> | |
| <div className="h-full w-[7px] left-0.5 blur-[1px] absolute z-10 bg-linear-90 from-black/20 to-black/5"></div> | |
| <div className="h-full w-[3px] left-4 blur-[1px] absolute z-10 bg-linear-90 from-black/10 to-black/5"></div> | |
| <div className="h-full w-full flex flex-col justify-between px-10 py-6 pr-6 relative z-100 "> | |
| <div className="text-lg font-medium text-neutral-950"> | |
| animations.dev | |
| </div> | |
| <div className="flex justify-between items-center"> | |
| <div className="text-sm text-neutral-950/75 font-medium"> | |
| Emil Kowalski | |
| </div> | |
| <div className="text-neutral-950/75"> | |
| <ExternalLink size={16} /> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div | |
| style={{ | |
| transform: " translateX(0px) translateZ(-50px)", | |
| }} | |
| className="w-50 h-60 bg-[#fff42b] absolute rounded-sm" | |
| ></div> | |
| <div | |
| style={{ | |
| transform: | |
| "rotateY(90deg) translateY(10px) translateX(25px) translateZ(167px) ", | |
| }} | |
| className="w-12 h-55 bg-white absolute" | |
| ></div> | |
| </motion.div> | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment