Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

react-native-actionsheet

> 前端框架
Open source

An elegant ActionSheet component for React Native.

1.4K stars0 likes2 views
WebsiteGitHub

About

An elegant ActionSheet component for React Native.

# react-native-actionsheet Cross platform ActionSheet. This component implements a custom ActionSheet and provides the same way to drawing it on the defferent platforms(iOS and Android). Actually, In order to keep the best effect, it still uses the ActionSheetIOS on iOS.
## Install ``` npm install react-native-actionsheet --save ``` ## Usage ```js import ActionSheet from 'react-native-actionsheet' class Demo extends React.Component { showActionSheet = () => { this.ActionSheet.show() } render() { return ( Open ActionSheet this.ActionSheet = o} title={'Which one do you like ?'} options={['Apple', 'Banana', 'cancel']} cancelButtonIndex={2} destructiveButtonIndex={1} onPress={(index) => { /* do something */ }} /> ) } } ``` ### Use ActionSheetCustom directly so you can customize option and title ``` … ``` ### How to redesign style ? The style of ActionSheet is defined in [lib/styles.js](https://github.com/beefe/react-native-actionsheet/blob/master/lib/styles.js). We can pass the `styles` prop to cover default style. See [Example](https://github.com/beefe/react-native-actionsheet/blob/master/example/app/ExampleB.js#L48) . ```javascript // example const styles = { titleBox: { background: 'pink' }, titleText: { fontSize: 16, color: '#000' } } ``` ## Props https://github.com/beefe/react-native-actionsheet/blob/master/lib/options.js
Prop name Description Type Default
title PropTypes.string or PropTypes.element
message PropTypes.string or PropTypes.element
options PropTypes.arrayOf([PropTypes.string, PropTypes.element])
tintColor PropTypes.string
cancelButtonIndex PropTypes.number
destructiveButtonIndex PropTypes.number
onPress PropTypes.func (index) => {}
styles only for ActionSheetCustom {}

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptactionsheetreact-native

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架