Skip to content

Animate bottom sheet when unmounts #1990

@andrecrimb

Description

@andrecrimb

Feature Request

Why it is needed

Bottom sheet has currently available the animateOnMount prop which:

... initially mount the sheet closed and when it is mounted and calculated the layout, it will snap to initial snap point index.

Our team came across a use case, where we need to have the same animation but when the BS unmounts (some sort of exiting animation).
I believe this feature is quite beneficial for those who need to handle several bottom sheets and seek some sort of a continuation flow. (eg. one BS slides down and another one slides up)

Possible implementation

Reanimated 2 allows animated views to have exiting animations.

Code sample

I imagine the use of animatedOnUnmount (or animateOnExiting) something like:

 return (
   <BottomSheet
      animateOnExiting={true}
      {...otherProps}
    />
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinvalidThis doesn't seem right

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions