Animated List Demo
magicui/animated-list-demoFreeExample
Example showing a list with sequenced item animations.
Live preview
live · rendered by the registry
Rendered by magicui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://magicui.design/r/animated-list-demo.jsonSource
1"use client"23import { cn } from "@/lib/utils"4import { AnimatedList } from "@/registry/magicui/animated-list"56interface Item {7 name: string8 description: string9 icon: string10 color: string11 time: string12}1314let notifications = [15 {16 name: "Payment received",17 description: "Magic UI",18 time: "15m ago",1920 icon: "💸",21 color: "#00C9A7",22 },23 {24 name: "User signed up",25 description: "Magic UI",26 time: "10m ago",27 icon: "👤",28 color: "#FFB800",29 },30 {31 name: "New message",32 description: "Magic UI",33 time: "5m ago",34 icon: "💬",35 color: "#FF3D71",36 },37 {38 name: "New event",39 description: "Magic UI",40 time: "2m ago",41 icon: "🗞️",42 color: "#1E86FF",43 },44]4546notifications = Array.from({ length: 10 }, () => notifications).flat()4748const Notification = ({ name, description, icon, color, time }: Item) => {49 return (50 <figure51 className={cn(52 "relative mx-auto min-h-fit w-full max-w-[400px] cursor-pointer overflow-hidden rounded-2xl p-4",53 // animation styles54 "transition-all duration-200 ease-in-out hover:scale-[103%]",55 // light styles56 "bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)]",57 // dark styles58 "transform-gpu dark:bg-transparent dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset] dark:backdrop-blur-md dark:[border:1px_solid_rgba(255,255,255,.1)]"59 )}60 >61 <div className="flex flex-row items-center gap-3">62 <div63 className="flex size-10 items-center justify-center rounded-2xl"64 style={{65 backgroundColor: color,66 }}67 >68 <span className="text-lg">{icon}</span>69 </div>70 <div className="flex flex-col overflow-hidden">71 <figcaption className="flex flex-row items-center text-lg font-medium whitespace-pre dark:text-white">72 <span className="text-sm sm:text-lg">{name}</span>73 <span className="mx-1">·</span>74 <span className="text-xs text-gray-500">{time}</span>75 </figcaption>76 <p className="text-sm font-normal dark:text-white/60">77 {description}78 </p>79 </div>80 </div>81 </figure>82 )83}8485export default function AnimatedListDemo({86 className,87}: {88 className?: string89}) {90 return (91 <div92 className={cn(93 "relative flex h-[500px] w-full flex-col overflow-hidden p-2",94// … truncated
What it pulls in
Other registry items
Files it writes
More from magicui
All 247 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Android Demoandroid-demo | magicui | Examples | Free | no deps | |
| Android Demo 2android-demo-2 | magicui | Examples | Free | no deps | |
| Android Demo 3android-demo-3 | magicui | Examples | Free | no deps | |
| Animated Beam Bidirectionalanimated-beam-bidirectional | magicui | Examples | Free | no deps | |
| Animated Beam Demoanimated-beam-demo | magicui | Examples | Free | 1 dep | |
| Animated Beam Multiple Inputsanimated-beam-multiple-inputs | magicui | Examples | Free | no deps | |
| Animated Beam Multiple Outputsanimated-beam-multiple-outputs | magicui | Examples | Free | no deps | |
| Animated Beam Unidirectionalanimated-beam-unidirectional | magicui | Examples | Free | no deps |
