Jo Ko
Jo Ko

Reputation: 7575

React Native: How to create a menu brought up from bottom?

I am trying to recreate the following, where a menu is brought up from bottom when a button is pressed, but lost as to where to start. How can I go about doing so?

Any guidance or insight would be greatly appreciated.

Upvotes: 9

Views: 9407

Answers (2)

Gianfranco P
Gianfranco P

Reputation: 10794

It looks like this is the best so far. Works on Android and iOS.

https://github.com/prscX/react-native-bottom-action-sheet

Note: it requires native modules so it won't work on Expo.

Alternatively, you use this component from NativeBase: https://docs.nativebase.io/Components.html#actionsheet-def-headref

FYI: I haven't tested react-native-bottom-action-sheet

Upvotes: 3

Radek Czemerys
Radek Czemerys

Reputation: 1098

You can use a module like this for an example. IMO this can be done in two ways:

  1. Slide a View with animation like in the library linked above.

  2. Use a Modal component that will slide from the bottom (it's actually a default behaviour of this component). Remember to add a margin on top of the content to don't slide it to the top of the screen).

Upvotes: 1

Related Questions