ammarahm-ed / react-native-actions-sheet

A Cross Platform(Android, iOS & Web) ActionSheet with a flexible api, native performance and zero dependency code for react native. Create anything you want inside ActionSheet.
https://rnas.vercel.app
MIT License
1.41k stars 119 forks source link

Is something similar to react-native's Modal presentationStyle="pageSheet" supported? #348

Open DeluxeOwl opened 3 months ago

DeluxeOwl commented 3 months ago

Basically, that iOS only animation for modals, what you can see here at 4:49 - 4:52 https://youtu.be/EcIA3nfNbsg?t=290

kotchere commented 2 months ago

@DeluxeOwl You'll have to build your own custom behavior, I believe. Have a wrapper around your main screen/background/navigator, have a global listener that subscribes to a show/hide event on the sheet (via onBeforeShow and onBeforeClose). Then change the listener properties animate the scale down for the main screen to about 0.92 or so and opacity to 0.5 when showing and reset to scale 1 and opacity 1 when closed. That should do the trick