actionSheet
Overview
JourneyApps supports displaying Action Sheets to the user. Action Sheets need to be triggered from JavaScript/TypeScript.
var result = actionSheet(items, options);
The actionSheet()
function will block until the user selects an option or cancels the modal. The function returns the index of the option selected, starting from 0
or -1
if the actionSheet was canceled.
Syntax reference
items
Required
An array of:
strings denoting the text of the options
objects with one or more of the following properties:
text
: (string) The text of buttonicon
: (string) The icon to display on the button, left of the text. The icon can be a Font Awesome icon or an Ionicons icon. (Defaults tonull
)color
: (string) The color of the icon. Valid values include hex values (e.g.#C0FFEE
) or named colors (e.g.positive
options
Optional
An object with one or more of the following properties:
title
(string) The title of the Action Sheet (defaults tonull
)
Appearance
Standard actionSheet
actionSheet
var result = actionSheet(['Edit', 'Move', 'Delete'], {title: 'Modify job'})

actionSheet
with icons
actionSheet
with iconsvar result = actionSheet(
[
{ text: 'Edit', icon: 'fa-edit' },
{ text: 'Move', icon: 'fa-arrows-alt' },
{ text: 'Delete', icon: 'fa-trash' }
],
{ title: 'Modify job' }
);

If you use an on-press
in an object-table
or object-list
, specify icon="ion-more"
in the action
attribute. This will cause the table or list's action button to display as three dots, indicating to the user that a list of actions will display.
For more information, see the object-table and object-list reference documentation.
See also Icons for more information on the supported icons.
Last updated