Skip to content
caliper ui docs

Pro

Animated list

A list whose rows come and go gracefully: new rows open into place, removed rows close their gap and the rest glide to their new positions.

Pro
pnpm dlx shadcn@latest add @caliper/animated-list

Notifications

Northwind workspace · 3 unread

  • Export finished

    just now

  • Invoice INV-0417 sent

    2 min ago

  • Bank sync completed

    5 min ago

Installs components/ui/animated-list.tsxDepends on none beyond ReactMotion shared motion tokens

When to use

Use it for

  • Notifications, search results and chip rows that change while you look.
  • Any list where a jump would lose people's place.

Skip it when

  • Long lists that re-sort often; the glide becomes the show.
  • Tables, which have their own row behaviour.

Decisions

Why it is built this way, so you know what to keep when you change your copy.

Behaviour

Focus follows the neighbour
When the row that holds focus closes, focus moves to the nearest row that stays, so keyboard users keep their place.
A removed row stays until it has closed
It is kept in place, inert, for the length of its exit, then dropped. Bringing it back mid-exit opens it again instead of adding a second one.

Styling

The gap belongs to the row
Each row carries its own spacing, so the space closes with the row and nothing below jumps at the end.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/animated-list

Adds its 3 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

Usage

Import it from your copy of the source. The example behind the preview comes with the source.

example.tsx
import { AnimatedList } from "@/components/ui/animated-list"

The worked example comes with Pro

The 55-line example behind the preview opens here, ready to copy.

  • 626 Pro parts, blocks and page templates, all with source
  • $149 once, with lifetime updates. No renewal
  • A full refund within 14 days if it is not for you
Checking your licence…

API reference

AnimatedList

component

Also accepts the native props of its root element and a ref.

PropTypeDefaultDescription
as"div" | "ol" | "ul""ul"
gapnumber8Space between rows in pixels. It belongs to each row, so it closes with the row.

Accessibility

It is built on native elements, so roles and focus come from the browser.

No custom key handling; Tab and the native activation keys do the work.

Motion

Transitions use the shared duration and easing tokens. Under prefers-reduced-motion those tokens collapse to instant and travel distances go to zero, so state changes still happen without movement.

All Compare & browse examples