Hover image
I grabbed a ☕ coffee, explored the sights 🏙️, and took plenty of around London 🇬🇧 before catching my ✈️ flight home tonight.
Installation
1. Install dependencies
npm install motion
npx shadcn@latest add hover-card
2. Install hover image
npx shadcn-animated add hover-image
Usage
1import {2Button,3HoverCard,4HoverCardTrigger,5HoverImage,6} from "@/components/ui/hover-image";
1<div className="p-20 text-center">2<HoverCard>3<span className="text-3xl font-medium text-secondary-foreground">4I grabbed a ☕ coffee, explored the sights 🏙️, and took plenty of{" "}5</span>6<HoverCardTrigger7delay={10}8closeDelay={100}9render={10<Button variant="link">11<span className="text-3xl font-medium">📸 photos</span>12</Button>13}14/>15<span className="text-3xl font-medium text-secondary-foreground">16{" "}17around London 🇬🇧 before catching my ✈️ flight home tonight.18</span>1920<HoverImage>21<img22src="https://images.unsplash.com/photo-1569865867048-34cfce8d58fe?w=900"23alt="London"24className="h-40 w-full rounded object-cover"25/>2627<img28src="https://images.unsplash.com/photo-1454793147212-9e7e57e89a4f?w=900&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTR8fGxvbmRvbnxlbnwwfHwwfHx8MA%3D%3D"29alt="London"30className="max-h-40 w-full rounded object-cover"31/>32<img33src="https://images.unsplash.com/photo-1534011640498-530cfd0e854a?q=80&w=987"34alt="London trip"35className="max-h-40 w-full rounded object-cover"36/>37</HoverImage>38</HoverCard>39</div>