你所寻找的是Material Design中的Bottom Sheets(可参见示例here),以及iOS中的Action Sheets(更精确地说是定制化的action sheets,例如this one)。我发现了两个React Native库可以实现Bottom Sheets(仅适用于Android): https://github.com/cesardeazevedo/react-native-bottom-sheet-behavior https://github.com/WhatAKitty/react-native-bottom-sheet 而这个库可以实现自定义的Action Sheets(仅适用于iOS): https://github.com/eyaleizenberg/react-native-custom-action-sheet 我没有找到任何适用于两个平台的RN库,因此我们只能满足于我们所拥有的。祝好运!编辑:自从我的回答后,新的软件包已经推出:https://github.com/beefe/react-native-actionsheet。感谢@thibautnoah指出。
这个库 react-native-modalbox 实现了这种行为。它也跨平台且纯 JavaScript。 https://github.com/maxs15/react-native-modalbox
我基于react-native-drawer编写了react-native-bottom-drawer模块,它是纯javascript编写的,因此适用于IOS和Android。由于仍处于早期阶段,欢迎提出PR。