androidiosreact-nativeactionsheet

React Native: If you use ActionSheetIOS, what do you use for Android?


I have an action sheet in my React Native app that looks something like the image below. I've been using the Native Base ActionSheet, but want to remove Native Base from my project because of dependency conflicts.

I want to use the basic React Native ActionSheetIOS, but I'm wondering what to use for Android. It looks like there's no corresponding Action Sheet library for Android. Is there any way to do this without importing another 3rd party library?

enter image description here


Solution

  • There are no widely used action sheet implementation in native Android. Best option is to create your own action sheet or use a 3rd party library. There are few react native libraries that does this, for example

    react-native-action-sheet uses the native ActionSheet for IOS and a custom one for Android. You can customize the design to your needs using it's props.

    If you're not happy with this solution, there is also Bottom sheets. You can create your own one using the react-native-modalize library.

    If you absolutely don't want to install any 3rd party libraries, you then have to create your own one from scratch.