Skip to main content
ActionSheetIOS is iOS-only. On Android and other platforms, it has no effect.
The ActionSheetIOS API displays native iOS action sheets and share sheets. Action sheets present a set of options to the user, while share sheets enable content sharing through iOS’s native sharing capabilities.

Import

Methods

showActionSheetWithOptions()

Display an iOS action sheet with custom options. Parameters:
  • options: Configuration object (see Options below)
  • callback: Function called with the zero-based index of the selected button

Options

Example

showShareActionSheetWithOptions()

Display the iOS share sheet for sharing content. Parameters:
  • options: Share configuration object (see Options below)
  • failureCallback: Called if sharing fails
  • successCallback: Called with success status and sharing method

Options

If url points to a local file or is a base64-encoded URI, the file will be loaded and shared directly. This allows sharing images, videos, PDFs, etc.

Example

dismissActionSheet()

Dismisses the most recently presented action sheet. If no action sheet is present, a warning is displayed.

Example

Usage Examples

Basic Action Sheet

Action Sheet with Styling

Share Sheet

Sharing Local Image

Multiple Destructive Buttons

Platform-Specific Action Sheet

Notes

  • ActionSheetIOS only works on iOS. On other platforms, calls are ignored.
  • On iPad, action sheets are displayed as popovers. Use the anchor prop to specify the anchor point.
  • Destructive buttons are displayed in red to indicate destructive actions.
  • The cancel button is always displayed at the bottom (on iPhone) or outside the popover (on iPad).
  • Disabled buttons appear grayed out and don’t trigger the callback when tapped.
  • For sharing files, use file:// URLs or base64-encoded data URIs.
  • The share sheet respects the user’s sharing preferences and app availability.