Repository navigation
feat: add staggered cards demo - #5
Closed
janicduplessis wants to merge 5 commits into
Closed
janicduplessis wants to merge 5 commits into
janicduplessis wants to merge 5 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Android
Test plan