---
title: "actionSheet"
description: "Show a JavaScript-triggered sheet of actions for the user to choose from."
permalink: /docs/runtime/all-ui-components/actionsheet/
---
# actionSheet

### Overview

The Runtime supports displaying Action Sheets to the user. Action Sheets need to be triggered from JavaScript/TypeScript.

```javascript
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

| Parameter | Required | Details |
| --------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `items` | *Required* | An array of strings denoting the text of the options, or objects with one or more of the following properties: `text`: (string) the text of the button; `icon`: (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 to `null`; `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 to `null`. |

### Appearance

#### Standard `actionSheet`

```javascript
var result = actionSheet(['Edit', 'Move', 'Delete'], {title: 'Modify job'})
```

![](./media/spaces-2f9tchlr67elhbojpvhhud-2fuploads-2fgit-blob-c3f49c9f6c0b0912ca3f499edacf7a19256e3a82-2faction-sheet-example-4b7cc358.png)

#### `actionSheet` with icons and colors

```javascript
var result = actionSheet(
    [
        { text: 'Edit', icon: 'fa-edit', color: 'positive' },
        { text: 'Move', icon: 'fa-arrows-alt' },
        { text: 'Delete', icon: 'fa-trash' }
    ],
    { title: 'Modify job' }
);
```

![](./media/spaces-2f9tchlr67elhbojpvhhud-2fuploads-2fgit-blob-c2ab538ca2eb1be7de5f334f5b4c192e472f0b91-2faction-sheet-icons-eec4fa96.png)

<Info>

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](/docs/runtime/all-ui-components/object-table/) and [object-list](/docs/runtime/all-ui-components/object-list/) reference documentation.

See also [Icons](/docs/runtime/all-ui-components/icons/) for more information on the supported icons.

</Info>
