Modern Cross-platform ActionSheet For React Native

A simple yet modern and cross-platform ActionSheet component using the native Android ActionSheets and ActionSheetIOS.

How to use it:

1. Install the package.

# Yarn
$ yarn add react-native-cross-actionsheet

# NPM
$ npm react-native-cross-actionsheet --save

2. Import the ‘ActionSheet’ module.

import { ActionSheet } from 'react-native-cross-actionsheet'

3. Add items to the ActionSheet.

ActionSheet.options({
  title: 'Reactscript ActionSheet',
  message: 'Select An option',
  options: [
    { text: 'Create', onPress: () => console.log('create'), },
    { text: 'Update', onPress: () => console.log('update') },
    { text: 'Delete', onPress: () => console.log('delete'), destructive: true }
  ],
  cancel: { text: 'Cancel', onPress: () => console.log('cancel') },
  tintColor: '#008888',
  anchor: 'iOS ONLY'
})

Preview:

Modern Cross-platform ActionSheet For React Native

Download Details:

Author: aelesia

Live Demo: View The Demo

Download Link: Download The Source Code

Official Website: https://github.com/aelesia/react-native-cross-actionsheet

License: MIT

Add Comment