Skip to main content

Action List API

Properties
NameTypeDefaultDescription
itemsarray[]Sets the list items. Each item is an object with type, content, value and optional group, color, icon, selected, disabled fields. Content may include HTML — sanitize it in your application to prevent XSS.
loadingbooleanfalseShows a spinner instead of the list content.
disable-min-widthbooleanfalseSets the min-width of the component to 0.
always-show-searchbooleanfalseShows the search input even when there are fewer than 8 options.
always-show-activebooleanfalseShows the active item indicator even when the component is not focused.
search-hiddenbooleanfalsePrevents the search input from ever appearing.
empty-state-textstringText shown when the list is empty with no search keyword. Set to empty string to hide the empty state entirely.
selection-disabledbooleanfalseMakes all items unselectable but they still fire a change event on click.
heightstring"auto"Fixed height of the component. Accepts any CSS unit.
max-heightstring"auto"Maximum height of the component. Accepts any CSS unit.
auto-focusbooleanfalseFocuses the search input when it becomes visible.
multiplebooleanfalseEnables multiple selection.
selection-maxnumberMaximum number of selectable options. Must be greater than 0.
spacing"cozy" | "none""cozy"Outer padding of the actionlist.
item-limitnumber1000Maximum number of visible items. Items over the limit are hidden and only appear in search results.
JavaScript API
NameKindDescription
isFirstItemActivegetterReturns whether the first visible item is active (has secondary focus).
isLastItemActivegetterReturns whether the last visible item is active (has secondary focus).
selectedItemsgetterReturns the currently selected items.
moveActiveItem(direction)actionMoves secondary focus in the given direction. Accepts 'next', 'previous', 'first', or 'last'.
toggleActiveItem()actionActivates the currently focused item as if it was clicked.
Events
EventDescriptionReturns
changeFires on item selection change.{ detail: { value: string | string[] } }
searchFires on search input.{ detail: { value: string } }
hoverchangeFires when the mouse hover moves between items. Returns the hovered item or null when leaving.{ detail: { item: ActionlistItem | null } }
activechangeFires when keyboard focus moves between items. Returns the active item or null when leaving.{ detail: { item: ActionlistItem | null } }