Animated list
A list whose items slide in, fade out and glide to their new places when the data changes: a notification feed, a queue, a ranking. Nothing moves when it first appears. For a timestamped stream of events with its own layout, use the activity feed.
Install
npx shadcn@latest add @thrum-pro/animated-listThis is a Pro component. The command works once your project has a licence key: set up Pro or see pricing.
Data shape
AnimatedListItem children, each with a key that stays with its data: key={event.id}[
{ id: 41, title: "Invoice 2041 paid", detail: "Acme · €4,200" },
{ id: 40, title: "New seat added", detail: "Northwind · Mira Kaur" },
]Props
| Prop | Type | Default | Description |
|---|---|---|---|
AnimatedList: max | number | Default Infinity | Show at most this many items, the first ones. Items pushed past it leave with the exit motion. |
AnimatedList: live | boolean | Default false | Make it a feed: the list gets aria-live polite, so a screen reader reads new items as they arrive. It stays a list. |
AnimatedList: sound | boolean | Default true | Play the add sound when items join and the remove sound when they leave, if the visitor has sound on. A reorder is silent. |
AnimatedList: ...props | ComponentProps<"ul"> | – | Every other list attribute is passed through. Name a live list with aria-label. className is merged last. |
AnimatedListItem | HTMLMotionProps<"li"> | – | One item. Give it a key that stays with its data, never the index: the key is how a moved item is recognised. |
Motion and sound
Motion
- A new item fades in from 8 pixels above its place; items it pushes down slide to their new places on the surface spring.
- A leaving item fades and shrinks to 96% over 150 ms, then the items below close the gap.
- A reorder glides every item from its old place to its new one. Every motion can be interrupted and continues from where it is.
- Nothing moves when the list first appears.
- Reduced motion: items appear, leave and change places at once.
Sound
- The add sound when one or more items join, the remove sound when items leave. When both happen in one change, only the add sound plays.
- A reorder plays nothing.
Sound is off until the visitor turns it on. Pass sound={false} to keep this component silent. How sound works
Accessibility
- It is a ul of li elements, so a screen reader announces a list and its length.
- With live set the list is a polite live region: new items are read after what the reader is saying, and removals are not read.
- Focus stays where it was when items move. A focused item that leaves takes its focus with it, so move the focus first when a reader removes an item themselves.
- Motion is transform and opacity only; the text never changes size.
Source
The source comes with Pro
TypeScript source · Copy-paste ready · MIT-compatible for client projects · Includes all dependencies
Files and dependencies
- Adds
components/ui/animated-list.tsx- Packages
motion- Brings along
- Motion tokensSound engine
Changelog
- 1.0.0 · 2026-12-03First release.