Skip to main content

Overview

FloatingBlockActions is a self-contained component that displays floating action buttons when you hover over editor blocks. It handles hover tracking internally and exposes state via render props.

Features

  • API — compound components with render props
  • Auto-positioning — automatically positions itself next to blocks
  • Hover detection — shows on hover, hides on mouse leave
  • frozen prop — pause hover tracking when menus are open
  • TypeScript — full type safety

Installation

Basic Usage

API Reference

FloatingBlockActions (Root)

Root component that handles hover tracking and positioning.
Props: Render Props API:

FloatingBlockActions.Button

Action button component.
Props:

Examples

With BlockOptions

Conditional Buttons Based on Block Type

Styling

CSS Variables

Best Practices

BlockOptions

Context menu opened from drag handle

ActionMenuList

Block type selection menu