ActionList
ActionList is a vertical list of interactive actions or options. It's composed of items presented in a consistent, single-column format, with room for icons, descriptions, side information, and other rich visuals.
Page navigation navigation
React examples
Default
The simplest usage of an ActionList
Items with leading and trailing content
ActionList items can contain render non-interactive content, typically a visual such as an icon, before or after the item content.
Items with trailing actions
Similar to a trailing visual, except it triggers a secondary action when activated.
Items with dividers
Items with inline descriptions
Items with block descriptions
With a danger item
A variant used to highlight an action that requires extra attention from the user.
With an inactive item
Inactive items that are non-functional due to some system state such as an outage.
- Item one
With a loading item
With a disabled item
Single-select
- Item one
- Item two
- Item three
Multi-select
- Item one
- Item two
- Item three
Grouping items with a heading
Items
Listings
Grouping items with a divider
More code examples
The previous examples are a curated subset of the full capabilities of the ActionList component. For more examples, see the ActionList Storybook stories.
Props
ActionList
| Name | Default | Description |
|---|---|---|
children Required | ActionList.Item[] | ActionList.LinkItem[] | ActionList.Group[] | |
variant | 'inset' | 'inset' | 'horizontal-inset' | 'full'
|
selectionVariant | 'single' | 'multiple'Whether multiple items or a single item can be selected. | |
showDividers | booleanDisplay a divider above each | |
role | AriaRoleARIA role describing the function of the list. | |
sx Deprecated | SystemStyleObject |
ActionList.Item
| Name | Default | Description |
|---|---|---|
children Required | React.ReactNode | ActionList.LeadingVisual | ActionList.Description | ActionList.TrailingVisualPrimary content for an Item | |
variant | 'default' | 'default' | 'danger'
|
size | 'medium' | 'medium' | 'large'The block size of the ActionList items. |
onSelect | (event: React.MouseEvent<HTMLLIElement> | React.KeyboardEvent<HTMLLIElement>) => voidCallback that is called when the item is selected using either the mouse or keyboard. | |
selected | false | booleanIndicate whether the item is selected. Only applies to items that can be selected. |
active | false | booleanIndicate whether the item is active. There should never be more than one active item. |
disabled | false | booleanItems that are disabled can not be clicked, selected, or navigated to. |
inactiveText | stringText describing why the item is inactive. This may be used when an item's usual functionality is unavailable due to a system error such as a database outage. If there is a leading visual, the alert icon will replace the leading visual. If there is a trailing visual, it will replace the trailing visual. If there is no visual passed, it will be shown in the trailing visual slot to preserve left alignment of item content. Text will appear in a tooltip triggered by the alert icon in ActionList items, but text will appear below the description or title on ActionMenu items. | |
loading | booleanWhether the item is loading. | |
role | AriaRoleARIA role describing the function of the item. | |
id | stringid to attach to the root element of the Item | |
sx Deprecated | SystemStyleObject |
ActionList.Heading
| Name | Default | Description |
|---|---|---|
children Required | React.ReactNodeUse to give a heading to list | |
as | h3 | h1 | h2 | h3 | h4 | h5 | h6The level of the heading |
visuallyHidden | boolean | |
sx Deprecated | SystemStyleObject |
ActionList.LinkItem
| Name | Default | Description |
|---|---|---|
children Required | React.ReactNode | ActionList.LeadingVisual | ActionList.Description | ActionList.TrailingVisual | |
active | false | booleanIndicate whether the item is active. There should never be more than one active item. |
ref | React.RefObject<HTMLAnchorElement> | |
as | "a" | React.ElementType |
inactiveText | stringText describing why the item is inactive. This may be used when an item's usual functionality is unavailable due to a system error such as a database outage. | |
sx Deprecated | SystemStyleObject |
ActionList.LeadingVisual
| Name | Default | Description |
|---|---|---|
children Required | React.ReactNodeIcon (or similar) positioned before item text. | |
sx Deprecated | SystemStyleObject |
ActionList.TrailingVisual
| Name | Default | Description |
|---|---|---|
children Required | React.ReactNodeVisual positioned after item text. | |
sx Deprecated | SystemStyleObject |
ActionList.TrailingAction
| Name | Default | Description |
|---|---|---|
as | button | a | buttonHTML element to render as. |
label Required | stringAccessible name for the control. | |
icon Required | stringOcticon to pass into IconButton. When this is not set, TrailingAction renders as a | |
href | stringhref when the TrailingAction is rendered as a link. | |
loading | false | booleanWhether the TrailingAction is in a loading state. When true, the TrailingAction will render a spinner instead of an icon. Only available when |
ActionList.Description
| Name | Default | Description |
|---|---|---|
children Required | React.ReactNode | |
variant | 'inline' | 'inline' | 'block'
|
sx Deprecated | SystemStyleObject | |
className | string | undefinedCSS string | |
truncate | false | booleanWhether the inline description should truncate the text on overflow. |
ActionList.GroupHeading
| Name | Default | Description |
|---|---|---|
children Required | React.ReactNodeUse to give a heading to the groups | |
variant | 'subtle' | 'filled' | 'subtle'
|
auxiliaryText | stringSecondary text which provides additional information about a | |
visuallyHidden | boolean | |
as | h3 | h1 | h2 | h3 | h4 | h5 | h6The level of the heading and it is only required (enforce by runtime warning) for lists. (i.e. not required for ActionMenu or listbox roles) |
sx Deprecated | SystemStyleObject |
ActionList.Group
| Name | Default | Description |
|---|---|---|
children Required | ActionList.Item[] | ActionList.LinkItem[] | |
title Deprecated | stringPlease use | |
auxiliaryText | stringSecondary text that provides additional information about the group. | |
variant | 'subtle' | 'filled' | 'subtle'
|
selectionVariant | 'single' | 'multiple' | falseSet | |
role | AriaRoleARIA role describing the function of the list inside the group. | |
sx Deprecated | SystemStyleObject |
ActionList.Divider
| Name | Default | Description |
|---|---|---|
sx Deprecated | SystemStyleObject |