Skip to content

feat: stagger option — cascade items added together (#44) - #256

Merged
justin-schroeder merged 1 commit into
masterfrom
feat/44-stagger
Nov 22, 2026
Merged

justin-schroeder merged 1 commit into
masterfrom
feat/44-stagger

Conversation

@justin-schroeder

Copy link
Copy Markdown
Member

Closes #44.

autoAnimate(list, { stagger: 60 }) // items added in one go enter 60ms apart
  • Elements added to the same parent in one mutation batch get delay = index × stagger (DOM order) on their entry animation, with fill: "backwards" so waiting items stay hidden instead of flashing in.
  • Only add is staggered. Moves (remain), removals and anything the user interacts with are never delayed, as asked in the issue. Plugins keep full control of their own timing.
  • The default is 0, which leaves behavior unchanged.

Tests: new stagger.spec.ts asserts delays [0, 100, 200, 300] for four items added together, no delay on the item they push down, opacity 0 while waiting, and no delay by default. Chromium, Firefox and WebKit all pass. The full e2e suite: 100 passed, 8 skipped. The docs config example is updated.

@vercel

vercel Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
auto-animate Ready Ready Preview Nov 22, 2026 8:12pm UTC

Request Review

@justin-schroeder
justin-schroeder merged commit ae9ec53 into master Nov 22, 2026
3 checks passed
@justin-schroeder
justin-schroeder deleted the feat/44-stagger branch November 22, 2026 20:15

This branch was successfully deployed

1 active deployment
Preview — ea166268 Deployed Nov 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Staggered Animations?

1 participant