Skip to content

feat: add staggered cards demo - #5

Closed
janicduplessis wants to merge 5 commits into
mainfrom
feat/staggered-cards-demo
Closed

janicduplessis wants to merge 5 commits into
mainfrom
feat/staggered-cards-demo

Conversation

@janicduplessis

@janicduplessis janicduplessis commented Mar 14, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR adds a staggered cards demo to the example app that showcases enter animations with sequential timing. The demo illustrates how multiple elements can animate in one after another to create a polished, cascading entrance effect — a common pattern in production apps for lists, dashboards, and onboarding flows.

Solution

The demo renders four colored cards that fade in and slide up one by one using setTimeout-based stagger delays of 0, 150, 300, and 450 milliseconds. Each card starts in a hidden state via initialAnimate (opacity 0, translateY 30) and animates to its visible state (opacity 1, translateY 0) with a 400ms easeOut timing transition. A Replay button remounts the entire component tree by toggling a key, which resets all cards to their initial state and replays the staggered entrance animation from scratch.

iOS

iOS staggered cards

Android

Android staggered cards

Test plan

  • Built and ran on iOS simulator (iPhone 17 Pro, iOS 26.2) — verified staggered animation plays on mount and Replay remounts correctly
  • Built and ran on Android physical device (Samsung Galaxy S21+, Android 15) — verified same behavior
  • All CI checks pass (format, lint, types, test)

Add a new demo showcasing staggered enter animations with 4 colored
cards that fade in and slide up sequentially using JS-side timeouts.
Includes a Replay button to remount and replay the animation.
… demo

Add native delay support (transitionDelay) to timing animations on both
iOS (CAAnimation beginTime) and Android (Animator startDelay). Update the
staggered cards demo to use the native delay prop instead of JS setTimeout.
The delay prop hasn't landed on main yet (PR #2). Use JS-side
setTimeout to stagger card visibility until then.
@janicduplessis
janicduplessis deleted the feat/staggered-cards-demo branch March 15, 2026 01:45
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.

1 participant