Animated Card Stack
tripled/animated-card-stack-baseuiFreeComponent
Stacked cards that expand on hover (Base UI)
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-baseui.jsonSource
1"use client";23import { motion, useReducedMotion } from "framer-motion";45const cards = [6 { title: "Card 1", description: "First card" },7 { title: "Card 2", description: "Second card" },8 { title: "Card 3", description: "Third card" },9];1011export function AnimatedCardStackBaseUI() {12 const shouldReduceMotion = useReducedMotion();1314 return (15 <div className="relative flex items-center justify-center px-8 py-16">16 <div aria-hidden className="pointer-events-none absolute inset-0 -z-10">17 <motion.div18 className="absolute left-1/2 top-10 h-56 w-56 -translate-x-1/2 rounded-full bg-primary/20 blur-[140px]"19 animate={20 shouldReduceMotion21 ? undefined22 : { opacity: [0.25, 0.45, 0.25], scale: [0.9, 1.05, 0.95] }23 }24 transition={25 shouldReduceMotion26 ? undefined27 : { duration: 11, repeat: Infinity, ease: "easeInOut" }28 }29 />30 <motion.div31 className="absolute bottom-8 right-12 h-48 w-48 rounded-full bg-emerald-400/25 blur-[150px]"32 animate={33 shouldReduceMotion34 ? undefined35 : { opacity: [0.18, 0.35, 0.18], rotate: [0, 12, 0] }36 }37 transition={38 shouldReduceMotion39 ? undefined40 : { duration: 13, repeat: Infinity, ease: "linear" }41 }42 />43 </div>44 {cards.map((card, index) => {45 const baseScale = 1 - index * 0.04;46 const baseOffset = index * 18;47 const hoverMotion = shouldReduceMotion48 ? undefined49 : { scale: baseScale + 0.06, y: -20 };50 return (51 <motion.div52 key={card.title}53 initial={{ scale: baseScale, y: baseOffset, opacity: 0 }}54 animate={{ scale: baseScale, y: baseOffset, opacity: 1 }}55 whileHover={hoverMotion}56 whileFocus={hoverMotion}57 transition={{58 type: shouldReduceMotion ? "tween" : "spring",59 stiffness: 260,60 damping: 26,61 delay: index * 0.08,62 }}63 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"64 style={{ zIndex: cards.length - index }}65 tabIndex={0}66// … truncated
What it pulls in
npm packages
Other registry items
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-shadcnui | tripled | Components | Free | 2 deps | |
| Animated Checkboxanimated-checkbox-shadcnui | tripled | Components | Free | 2 deps |
