最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - React Native: How to create a menu brought up from bottom? - Stack Overflow

programmeradmin2浏览0评论

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.

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.

Share Improve this question edited Nov 22, 2018 at 14:46 Gianfranco P 10.8k7 gold badges54 silver badges68 bronze badges asked Aug 22, 2016 at 21:26 Jo KoJo Ko 7,57516 gold badges69 silver badges128 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 3

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

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

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

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

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

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 ponent that will slide from the bottom (it's actually a default behaviour of this ponent). Remember to add a margin on top of the content to don't slide it to the top of the screen).

发布评论

评论列表(0)

  1. 暂无评论