Editor
Block action menu
The menu that opens from a block’s ⋮⋮ handle: search, Turn into and Color submenus, Copy link, Duplicate, Move to, Delete, Comment, Ask AI, and a “Last edited” footer.
Last edited by You
Today at 9:00 AM
6 words, 31 characters
Usage
EditoropensBlockActionMenufrom the ⋮⋮ handle; render it yourself only in a custom editor.- Use it for actions on one block (turn into, color, duplicate, delete).
- Don’t use it for page-level actions; use
Menufor the page’s own menu.
Installation
Install the package (React 19):
terminal
terminal
terminal
Import the styles once, in your app entry or root layout:
/src/main.tsx
Use it anywhere inside your app's <Theme> (see Installation):
/src/BlockactionmenuExample.tsx
Examples
Interactive
Click the ⋮⋮ handle. Turn into and Color change the block; typing in the search box filters actions and turn-into targets.
A paragraph with six words here
Click the handle
Color submenu (static)
ColorMenuList is the Color submenu: “Last used”, then text colors, then background colors.
Last used
Text color
Background color
API Reference
BlockActionMenu
A Menu.Root (Radix DropdownMenu) whose trigger is children.
| Prop | Type | Default |
|---|---|---|
block | Block | |
children | ReactNode | |
open | boolean | |
onOpenChange | (open: boolean) => void | |
onTurnInto | (kind: BlockKind) => void | |
onColor | (color: BlockColor) => void | |
onCopyLink | () => void | |
onDuplicate | () => void | |
onMoveTo | () => void | |
onDelete | () => void | |
onComment | () => void | |
onSuggestEdits | () => void | |
onAskAI | () => void | |
lastEditedBy | string | "You" |
lastEditedAt | string | "Just now" |
lastUsedColor | BlockColor | |
modal | boolean | false |
side | "left""right""bottom""top" | "left" |
Helpers
| Prop | Type | Default |
|---|---|---|
blockLabel | (b: Pick<Block, "type" | "props">) => string | |
toColorValue | (c?: BlockColor) => ColorValue | |
fromColorValue | (v: ColorValue) => BlockColor |
Accessibility
- Radix DropdownMenu:
menu/menuitemroles, ↑ ↓ to move, → / ← to open and close submenus, Enter to run, Esc to close. - The search box gets focus on open; typing filters, while ↑ ↓ Enter Esc Tab still reach the menu.
- Focus is not returned to the handle on close (
onCloseAutoFocusprevented), so the caret stays in the document.
© 2026 Motion. Internal documentation.