Skip to content

feat(action-sheet): add initialVisible prop for immediate rendering#506

Open
deyvid-bardarov wants to merge 1 commit into
ammarahm-ed:masterfrom
ebagbg:add-initial-visible-prop
Open

feat(action-sheet): add initialVisible prop for immediate rendering#506
deyvid-bardarov wants to merge 1 commit into
ammarahm-ed:masterfrom
ebagbg:add-initial-visible-prop

Conversation

@deyvid-bardarov

@deyvid-bardarov deyvid-bardarov commented Feb 9, 2026

Copy link
Copy Markdown

Add initialVisible prop for immediate rendering

Summary

  • Adds a new initialVisible prop to ActionSheetProps that allows the sheet to be visible immediately on initial render, without the opening animation.
  • When initialVisible is true, the sheet sets its opacity and position directly to their open-state values instead of running the spring animation, avoiding any flicker or delay.
  • Passes initialVisible through to useSheetManager so the internal visible state is initialized to true.

This eliminates the need for workarounds like calling ref.show() inside a setTimeout after mount.

Closes #404

Test plan

  • Verify a sheet with initialVisible renders fully open on mount with no animation flicker
  • Verify a sheet without initialVisible still animates open as before (no regression)
  • Verify the initially-visible sheet can be closed and re-opened normally after the initial render
  • Test on both iOS and Android

@vercel

vercel Bot commented Feb 9, 2026

Copy link
Copy Markdown

@deyvid-bardarov is attempting to deploy a commit to the Ammar Ahmed's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

Any example on how to automatically open the sheet when the component mounts?

1 participant