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.

Text
Turn into
Color
Copy link to block⌘^L
Duplicate⌘D
Move to⌘⇧P
DeleteDel
Comment⌘⇧M
Suggest edits⌘⇧⌥X
Ask AI⌘J
Last edited by You
Today at 9:00 AM
6 words, 31 characters

Usage

  • Editor opens BlockActionMenu from 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 Menu for the page’s own menu.

Installation

Install the package (React 19):

terminal
npm install @krackedui/motion

Import the styles once, in your app entry or root layout:

/src/main.tsx
import '@krackedui/motion/styles.css';

Use it anywhere inside your app's <Theme> (see Installation):

/src/BlockactionmenuExample.tsx
import { MenuFooter, MenuLabel, MenuList, MenuRow, MenuSearch, MenuSurface } from '@krackedui/motion';

export function BlockActionMenuExample() {
  // Static rendering of the open menu (for docs and previews).

  return (
    <MenuSurface width={265} className="flex flex-col">
      <MenuSearch noIcon wrapperClassName="px-3 pb-1 pt-2" placeholder="Search actions…" readOnly />
      <MenuLabel id="block-menu-label" className="mx-1 mt-1">Text</MenuLabel>
      <MenuList aria-labelledby="block-menu-label" className="pt-0">
        <MenuRow icon="arrowSquarePathUpDown" submenu>Turn into</MenuRow>
        <MenuRow icon="blockColor" submenu>Color</MenuRow>
      </MenuList>
      <MenuList aria-label="Block actions" separator>
        <MenuRow icon="link" shortcut="⌘^L">Copy link to block</MenuRow>
        <MenuRow icon="duplicate" shortcut="⌘D">Duplicate</MenuRow>
        <MenuRow icon="arrowTurnUpRight" shortcut="⌘⇧P">Move to</MenuRow>
        <MenuRow icon="trash" shortcut="Del">Delete</MenuRow>
      </MenuList>
      <MenuList aria-label="Review" separator>
        <MenuRow icon="commentPencil" shortcut="⌘⇧M">Comment</MenuRow>
        <MenuRow icon="commentPencil" shortcut="⌘⇧⌥X">Suggest edits</MenuRow>
      </MenuList>
      <MenuList aria-label="AI" separator>
        <MenuRow icon="aiFace" shortcut="⌘J">Ask AI</MenuRow>
      </MenuList>
      <MenuFooter lines={['Last edited by You', 'Today at 9:00 AM', '6 words, 31 characters']} />
    </MenuSurface>
  );
}

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
Yellow background⌘⇧H
Text color
Default text
Gray text
Brown text
Orange text
Yellow text
Green text
Blue text
Purple text
Pink text
Red text
Background color
Default background
Gray background
Brown background
Orange background
Yellow background
Green background
Blue background
Purple background
Pink background
Red background

API Reference

BlockActionMenu

A Menu.Root (Radix DropdownMenu) whose trigger is children.

PropTypeDefault
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

PropTypeDefault
blockLabel
(b: Pick<Block, "type" | "props">) => string
toColorValue
(c?: BlockColor) => ColorValue
fromColorValue
(v: ColorValue) => BlockColor

Accessibility

  • Radix DropdownMenu: menu / menuitem roles, ↑ ↓ 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 (onCloseAutoFocus prevented), so the caret stays in the document.
© 2026 Motion. Internal documentation.