Skip to content

feat: add transition delay + document backgroundColor spring limitation - #2

Merged
janicduplessis merged 3 commits into
mainfrom
feat/delay-and-docs
Mar 15, 2026
Merged

janicduplessis merged 3 commits into
mainfrom
feat/delay-and-docs

Conversation

@janicduplessis

@janicduplessis janicduplessis commented Mar 14, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR adds a delay prop to the TimingTransition type, allowing animations to start after a specified delay in milliseconds. This enables staggered animation effects without requiring JavaScript-side timeouts.

Solution

The delay is implemented natively on both platforms. On iOS, the CAAnimation beginTime property is set relative to CACurrentMediaTime(). On Android, the ObjectAnimator startDelay property is used.

iOS

iOS demo

Android

Android demo

Test plan

  • Built and ran on iOS simulator (iPhone 17 Pro, iOS 26.2)
  • Built and ran on Android device (Samsung Galaxy S21+)
  • Verified 2s delay before animation starts (clearly visible in demos)
  • All CI checks pass

janicduplessis added a commit that referenced this pull request Mar 14, 2026
The delay prop hasn't landed on main yet (PR #2). Use JS-side
setTimeout to stagger card visibility until then.
…imitation

Add `delay` option (milliseconds) to TimingTransition and SpringTransition
types. Implemented via CAAnimation.beginTime on iOS, ObjectAnimator.startDelay
on Android (timing/color), and postDelayed for SpringAnimation. Added a
callout in README about Android backgroundColor being timing-only, and a
delay demo in the example app.
@janicduplessis
janicduplessis merged commit 0d0adda into main Mar 15, 2026
4 checks passed
@janicduplessis
janicduplessis deleted the feat/delay-and-docs branch March 15, 2026 06:51
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