Socket
Book a DemoInstallSign in
Socket

@rn-common/action-sheet

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rn-common/action-sheet

This library provides a cross-platform action sheet component for React Native, leveraging native `ActionSheetIOS` for iOS and a custom bottom sheet for other platforms.

53.0.3
latest
npmnpm
Version published
Weekly downloads
16
77.78%
Maintainers
1
Weekly downloads
 
Created
Source

@rn-common/action-sheet

This library provides a cross-platform action sheet component for React Native, leveraging native ActionSheetIOS for iOS and a custom bottom sheet for other platforms.

Installation

Install using npm:

npm install @rn-common/action-sheet

or yarn:

yarn add @rn-common/action-sheet

Usage

Showing an Action Sheet

To display an action sheet, use the showActionSheet function:

import { showActionSheet } from '@rn-common/action-sheet'

const actionSheet = {
  title: 'Title',
  message: 'Message',
  buttons: [
    { text: 'Option 1', onPress: () => console.log('Option 1 selected') },
    { text: 'Option 2', onPress: () => console.log('Option 2 selected') },
    {
      text: 'Cancel',
      onPress: () => console.log('Cancel selected'),
      type: 'cancel',
    },
  ],
}

showActionSheet(actionSheet)

Button Types

  • default: Standard button style.
  • cancel: Typically used to cancel the action sheet; positioned separately.
  • destructive: Used for actions that may have negative consequences.

showActionSheet Function

The showActionSheet function takes an ActionSheet object with the following structure:

  • title (optional): A title for the action sheet.
  • message (optional): A message displayed below the title.
  • buttons: An array of buttons, each with a text, onPress, and an optional type ('default', 'cancel', 'destructive').

FAQs

Package last updated on 24 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.