Overview
FloatingToolbar is a self-contained component that displays a formatting toolbar when text is selected. It handles selection tracking internally and exposes visibility state via context.

Features
- API — compound components with auto-visibility
- Selection tracking — automatically shows/hides on text selection
- Block selection support — also works when blocks are selected
frozenprop — pause selection tracking when popups are open- TypeScript — full type safety
Installation
Basic Usage
API Reference
FloatingToolbar (Root)
Root component that handles selection tracking.
Render Props API:
FloatingToolbar.Content
Floating content panel. Automatically hides when no selection.
FloatingToolbar.Group
Groups related buttons together.
FloatingToolbar.Button
Individual toolbar button.
FloatingToolbar.Separator
Visual separator between groups.
Examples
With Turn Into Button
Rich Formatting Toolbar
Styling
CSS Variables
Custom Styles
Best Practices
Use frozen prop when opening popovers
Use frozen prop when opening popovers
Check if format exists before rendering
Check if format exists before rendering
Related Components
ActionMenuList
Open from “Turn into” button
FloatingBlockActions
Block-level action buttons

