Animated List
MotionA live feed where new items drop in at the top with a spring and older ones slide down. Ideal for activity streams, notifications and happening now sections.
Installation
npx shadcn@latest add @minidev/animated-list
MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/animated-list.json
Usage
import { AnimatedList } from "@/components/ui/animated-list"
export function Example() {
return (
<AnimatedList />
)
}
API reference
| Prop | Type | Default |
|---|---|---|
| itemsItems to cycle through, newest first. | ListItem[] | DEFAULT |
| intervalMilliseconds between arrivals. | number | 1800 |
| maxHow many items to keep on screen. | number | 4 |
| labelAccessible name for the list, which is a tab stop so keyboard users can pause it. | string | "Live activity" |
| className | string | - |
When to use
Use it for "happening now" sections, notification previews and activity streams on marketing pages. Items cycle through items on a timer while the list is on screen, and pause while the pointer is over it or it has keyboard focus (the list is a tab stop, named by label). Reduced motion shows the first max items, still. For a static list of notifications use a plain list; for a one-off reveal use BlurFade.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Focuses the list, which pauses the feed until focus leaves. |
Accessibility
- It renders a
<ul>of<li>items. There is no live region, so screen readers are not interrupted by each arrival. - The
<ul>is a tab stop withtabIndex={0}, afocus-visiblering and anaria-labelfromlabel("Live activity" by default). Hover or keyboard focus pauses the feed, so it can be read (WCAG 2.2.2). - Under reduced motion
layoutanimation is off and enter and exit transitions take 0s.
Frequently asked questions
Can I push real-time events into AnimatedList?
Not as is. It cycles through items on a timer (interval, 1800ms by default) and loops back to the first item, so it suits a demo feed on a marketing page. For a real stream of events use ActivityFeed or NotificationInbox.
Does it keep animating when nobody is looking?
No. The timer only runs while at least 40% of the list is on screen, and it pauses while the pointer is over it or the list has keyboard focus. Under reduced motion it shows the first max items and never changes.
Dependencies
npm
Built from
Examples
Custom items
Items cycle in order and wrap around; each takes a lucide icon, a title, a detail line and a time label.
Faster with more rows
interval is the gap between arrivals in milliseconds and max is how many stay on screen before the oldest leaves.
Beside marketing copy
Pair the feed with a headline in a two column section; the list pauses when it scrolls out of view.