Action Panel
API Reference
ActionPanel
Exposes a list of actions that can be performed by the user.
Often items are context-aware, e.g., based on the selected list item. Actions can be grouped into semantic sections and can have keyboard shortcuts assigned.
The first and second action become the primary and secondary action. They automatically get the default keyboard shortcuts assigned. In List, Grid, and Detail, this is ↵
for the primary and ⌘
↵
for the secondary action. In Form it's ⌘
↵
for the primary and ⌘
⇧
↵
for the secondary. Keep in mind that while you can specify an alternative shortcut for the primary and secondary actions, it won't be displayed in the Action Panel.
Example
Props
Prop | Description | Type | Default |
---|---|---|---|
children | - | ||
title | The title displayed at the top of the panel |
| - |
ActionPanel.Section
A group of visually separated items.
Use sections when the ActionPanel contains a lot of actions to help guide the user to related actions. For example, create a section for all copy actions.
Example
Props
Prop | Description | Type | Default |
---|---|---|---|
children | The item elements of the section. | - | |
title | Title displayed above the section |
| - |
ActionPanel.Submenu
A very specific action that replaces the current ActionPanel with its children when selected.
This is handy when an action needs to select from a range of options. For example, to add a label to a GitHub pull request or an assignee to a todo.
Example
Props
Prop | Description | Type | Default |
---|---|---|---|
title* | The title displayed for submenu. |
| - |
autoFocus | Indicates whether the ActionPanel.Submenu should be focused automatically when the parent ActionPanel (or Actionpanel.Submenu) opens. |
| - |
children | Items of the submenu. | - | |
filtering | Toggles Raycast filtering. When |
|
|
icon | The icon displayed for the submenu. | - | |
isLoading | Indicates whether a loading indicator should be shown or hidden next to the search bar |
|
|
shortcut | The keyboard shortcut for the submenu. | - | |
throttle | Defines whether the |
|
|
onOpen | Callback that is triggered when the Submenu is opened. |
| - |
onSearchTextChange | Callback triggered when the search bar text changes. |
| - |
Types
ActionPanel.Children
Supported children for the ActionPanel component.
ActionPanel.Section.Children
Supported children for the ActionPanel.Section component.
ActionPanel.Submenu.Children
Supported children for the ActionPanel.Submenu component.
Last updated