Ballmac UI home

Stagger List

A list or grid whose items arrive one after another from any direction, then glide to their new places when filtered, sorted, added or removed.

  • Button

    Primitives

  • Dialog

    Overlays

  • Data table

    Data

  • Tabs

    Navigation

  • Command menu

    Overlays

  • Calendar

    Data

Installation

$ pnpm dlx shadcn@latest add @ballmac/stagger-list

Usage

import { StaggerList, StaggerItem } from "@/components/ballmac/stagger-list"

The full example is in the Code tab above.

Examples

Four directions

up
  • 1
  • 2
  • 3
  • 4
  • 5
down
  • 1
  • 2
  • 3
  • 4
  • 5
left
  • 1
  • 2
  • 3
  • 4
  • 5
right
  • 1
  • 2
  • 3
  • 4
  • 5
scale
  • 1
  • 2
  • 3
  • 4
  • 5

API reference

PropTypeDefault
as

Element for the list.

"ul" | "ol" | "div""ul"
stagger

Seconds between items.

number0.07
delay

Seconds before the first item.

number0
direction

Where items come from.

StaggerDirection"up"
distance

Travel distance in pixels.

number16
inView

Wait for the list to scroll into view.

booleantrue
reorder

Items glide to their new place when the list is filtered, sorted or items are added or removed.

booleantrue

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Screen readersThe real list markup is untouched; only opacity and position change
Reduced motionItems are shown at once and reordering is instant

Use with AI

<StaggerList stagger direction distance inView reorder><StaggerItem key={id}>…</StaggerItem></StaggerList>. Keep each item's key stable and filtering or sorting animates automatically. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Stagger List (@ballmac/stagger-list) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Result lists that filter or sort
  • Feature grids that should arrive in sequence

Not for

  • A live feed where new items push others down (animated-list)
  • Plain fade-ins (blur-fade)

Registry JSON: https://ui.ballmac.com/r/stagger-list.json

Credits

Free to use in personal and commercial projects.

Registry
shadcn/utils