Skip to content
Thrum

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-list

This is a Pro component. The command works once your project has a licence key: set up Pro or see pricing.

Data shape

Type
AnimatedListItem children, each with a key that stays with its data: key={event.id}
Sample
[
  { id: 41, title: "Invoice 2041 paid", detail: "Acme · €4,200" },
  { id: 40, title: "New seat added", detail: "Northwind · Mira Kaur" },
]

Props

PropTypeDefaultDescription
AnimatedList: maxnumberDefault InfinityShow at most this many items, the first ones. Items pushed past it leave with the exit motion.
AnimatedList: livebooleanDefault falseMake it a feed: the list gets aria-live polite, so a screen reader reads new items as they arrive. It stays a list.
AnimatedList: soundbooleanDefault truePlay the add sound when items join and the remove sound when they leave, if the visitor has sound on. A reorder is silent.
AnimatedList: ...propsComponentProps<"ul">–Every other list attribute is passed through. Name a live list with aria-label. className is merged last.
AnimatedListItemHTMLMotionProps<"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

SourcePro

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. 1.0.0 · 2026-12-03First release.

Loading index…

Keyboard shortcuts

/Ctrl KSearch components, docs and actions
?Show this list
AAppearance studio
SSound on or off
MFull or reduced motion
TTheme: auto, light, dark
GSurface: solid or frosted
BBackdrop photograph (under glass)
CCorner radius: square to round
RReplay the demo, on a component page
DDraw new data, on a component page
←→HomeEndMove the cursor in a focused chart
EscClose a dialog, or leave a chart cursor