Animated Card Stack
tripled/animated-card-stack-shadcnuiFreeComponent
Stacked cards that expand on hover
Live preview
live · rendered by the registry
Rendered by tripled on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.tripled.work/r/animated-card-stack-shadcnui.jsonSource
1"use client";23import {4 Card,5 CardContent,6 CardDescription,7 CardHeader,8 CardTitle,9} from "@/components/ui/card";10import { motion, useReducedMotion } from "framer-motion";1112const cards = [13 { title: "Card 1", description: "First card" },14 { title: "Card 2", description: "Second card" },15 { title: "Card 3", description: "Third card" },16];1718export function AnimatedCardStack() {19 const shouldReduceMotion = useReducedMotion();2021 return (22 <div className="relative flex items-center justify-center px-8 py-16">23 <div aria-hidden className="pointer-events-none absolute inset-0 -z-10">24 <motion.div25 className="absolute left-1/2 top-10 h-56 w-56 -translate-x-1/2 rounded-full bg-primary/20 blur-[140px]"26 animate={27 shouldReduceMotion28 ? undefined29 : { opacity: [0.25, 0.45, 0.25], scale: [0.9, 1.05, 0.95] }30 }31 transition={32 shouldReduceMotion33 ? undefined34 : { duration: 11, repeat: Infinity, ease: "easeInOut" }35 }36 />37 <motion.div38 className="absolute bottom-8 right-12 h-48 w-48 rounded-full bg-emerald-400/25 blur-[150px]"39 animate={40 shouldReduceMotion41 ? undefined42 : { opacity: [0.18, 0.35, 0.18], rotate: [0, 12, 0] }43 }44 transition={45 shouldReduceMotion46 ? undefined47 : { duration: 13, repeat: Infinity, ease: "linear" }48 }49 />50 </div>51 {cards.map((card, index) => {52 const baseScale = 1 - index * 0.04;53 const baseOffset = index * 18;54 const hoverMotion = shouldReduceMotion55 ? undefined56 : { scale: baseScale + 0.06, y: -20 };57 return (58 <motion.div59 key={card.title}60 initial={{ scale: baseScale, y: baseOffset, opacity: 0 }}61 animate={{ scale: baseScale, y: baseOffset, opacity: 1 }}62 whileHover={hoverMotion}63 whileFocus={hoverMotion}64 transition={{65 type: shouldReduceMotion ? "tween" : "spring",66 stiffness: 260,67 damping: 26,68 delay: index * 0.08,69 }}70 className="absolute w-64 rounded-3xl focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:ring-offset-2 focus-visible:ring-offset-background"71 style={{ zIndex: cards.length - index }}72// … truncated
What it pulls in
npm packages
Files it writes
More from tripled
All 282 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| AI Chat Interfaceai-chat-interface-shadcnui | tripled | Components | Free | 2 deps | |
| AI Glow Inputai-glow-input-shadcnui | tripled | Components | Free | 2 deps | |
| AI Loading Skeletonai-loading-skeleton-shadcnui | tripled | Components | Free | 2 deps | |
| AI Response Typing Streamai-response-typing-shadcnui | tripled | Components | Free | 2 deps | |
| AI Unlock Animationai-unlock-animation-shadcnui | tripled | Components | Free | 2 deps | |
| Animated Accordionanimated-accordion-shadcnui | tripled | Components | Free | 2 deps | |
| Animated Card Stackanimated-card-stack-baseui | tripled | Components | Free | 2 deps | |
| Animated Checkboxanimated-checkbox-shadcnui | tripled | Components | Free | 2 deps |
