自下而上的自底向上抽屉 [英] Bottom Up drawer in react native

查看:263
本文介绍了自下而上的自底向上抽屉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的本地人.我想在IOS中创建一个菜单滑块,例如控制中心.我以为可以使用 react-native-drawer ,但是该库不提供一种从底部打开抽屉的方法.你们可以建议一些实现该目标的方法吗?

I am new to react native. I want to create a menu slider like control center in IOS. I thought I can use react-native-drawer but the library doesn't provide a way to open drawer from the bottom. can you guys suggest something to implement that?

推荐答案

您正在寻找的东西称为材料设计中的底页"(请参见

What you are looking for are called Bottom Sheets in Material Design (see here for examples) and Action Sheets in iOS (customized action sheets more precisely, like this one).

我发现了两个实现本底表的React Native库(仅适用于android):

I found two React Native libraries which implement Bottom Sheets (so only for android):

  • https://github.com/cesardeazevedo/react-native-bottom-sheet-behavior
  • https://github.com/WhatAKitty/react-native-bottom-sheet

该库实现了自定义操作表(仅适用于ios):

And this library implements custom Action Sheets (so only for ios):

我没有找到适用于两个平台的RN库,因此我们将对所拥有的东西感到满意.祝你好运!

I didn't find any RN library which works for both platforms, so we will have to be happy with what we've got. Good luck!

自从我回答以来,出现了一个新软件包: https://github.com/beefe /react-native-actionsheet .感谢@thibautnoah指出来.

Since my answer a new package came out: https://github.com/beefe/react-native-actionsheet. Thanks @thibautnoah for pointing it out.

这篇关于自下而上的自底向上抽屉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆