Skip to main content

ActionSheet

ActionSheets are sheets that slide up from the bottom of the screen, and present two or more choices related to an intentional user action.

Import

import { ActionSheet } from '@nomada-sh/react-native-eyecandy';

Example

Props

Required
options

Type
ActionSheetOption[]

visible

Type
boolean

title

Type
string

message

Type
string

onClose

() => void;
Type
function

onPressAction

(index: number) => void;
Type
function

onCancel

() => void;
Type
function

showCancelIcon

Type
boolean

cancelText

TypeDefault
string'Cancel'

native

When set to true, the action sheet will be rendered natively on iOS or Android.

Example

Type
boolean

dark
iOS

When set to true, the action sheet will be rendered in dark mode on iOS.

Type
boolean

Type definitions

ActionSheetOption

Type
string, object

When the type is string, the string is the label of the option.

When the type is object, the object must have the following properties:

NameTypeRequiredDescription
labelstringYesThe label of the option
iconIconNoThe icon of the option