Overview
ActionMenuList is a controlled dropdown menu for selecting block types or contextual actions. It uses Floating UI for positioning and a portal so it can render anywhere in the DOM. Unlike SlashActionMenuList, this component is designed for button-triggered menus (toolbar, block options, etc.).

Features
- ✅ Controlled API (
open,close,getRootProps) - ✅ Floating positioning with placement/middleware options
- ✅ Compound components (
Root,Group,Item,Empty) - ✅ Type-ahead filtering (optional)
- ✅ Supports icons, descriptions, small/large views
- ✅ Keyboard + mouse friendly
When to Use
| Component | Use Case |
|---|---|
ActionMenuList | Button-triggered menus (Toolbar “Turn into”, BlockOptions “Turn into”) |
SlashActionMenuList | Slash command (inline) menu |
Basic Usage
API Reference
Components
ActionMenuList.Root
Floating container. Receives props from getRootProps().
children, className?, style?
ActionMenuList.Group
Wraps items (vertical stack).
children, className?
ActionMenuList.Item
Selectable option.
action: ActionMenuItem(type/title/description/icon)selected?: booleanview?: 'small' | 'default'icon?: ReactNodeclassName?- spreads button props (
type="button")
ActionMenuList.Empty
Empty state fallback.
Hooks
useActionMenuList()
Full hook with Floating UI and selection logic. Use in the component that renders ActionMenuList.
| Property | Type | Description |
|---|---|---|
isOpen | boolean | Whether the menu is mounted (with transitions) |
actions | ActionMenuItem[] | Processed block types |
selectedAction | ActionMenuItem | null | Currently highlighted action |
empty | boolean | Whether there are zero actions |
view | 'small' | 'default' | Current view mode |
open | (options) => void | Open menu with options |
close | () => void | Close menu |
getItemProps | (type) => ItemProps | Props for each ActionMenuList.Item |
getRootProps | () => RootProps | Props for ActionMenuList.Root |
options for open:
useActionMenuListActions()
Lightweight hook to open/close programmatically.
Examples
Toolbar “Turn into”
BlockOptions integration
Custom actions + icons
Styling
CSS variables
Custom classes
Accessibility
- Uses
role="listbox"androle="option"semantics - Keyboard navigation handled by
getItemProps(Arrow Up/Down, Enter) - Provide descriptive titles/descriptions for screen readers
Best Practices
Keep view consistent with context
Keep view consistent with context
Always pass reference element
Always pass reference element
Close menu when action completes
Close menu when action completes