Atelier UI

Search components…

Search components…

Floating Toolbar

A selection-style floating toolbar with roving tabindex, separator and an overflow menu.

Edit in sandbox

Copy a prompt for your AI coding tool with the source, dependencies and usage

Props

FloatingToolbarProps

Also accepts all props of Omit<React.ComponentProps<"div">, "children" | "onSelect">

PropTypeDefaultDescription
anchor* requiredToolbarAnchor | null—Rectangle to hover over, relative to the positioned parent. null hides the toolbar.
containerWidth* requirednumber—Width of the positioned parent, used to keep the toolbar inside it
groups* requiredToolbarAction[][]—Groups of actions; a separator is drawn between groups
overflowToolbarOverflowItem[][]—
onAction* required(id: string) => void——
onDismiss() => void—Called when Escape is pressed inside the toolbar
labelstring"Text formatting"—

Install

$ npx shadcn@latest add https://chromotion.dev/r/floating-toolbar.json

More like this