Floating Toolbar
A context toolbar that springs into view with magnetic, morphing action buttons.
Installation
pnpm dlx shadcn@latest add "https://godui.design/r/floating-toolbar.json"Usage
Drive open from a selection or hover state to spring the toolbar in and out.
tsx
import { FloatingToolbar } from "@godui/components";
const [open, setOpen] = useState(false);
<FloatingToolbar
open={open}
actions={[{ icon: <BoldIcon />, label: "Bold", onClick: bold }]}
/>;Props
| Prop | Type | Default | Description |
|---|---|---|---|
actions | ToolbarAction[] | — | { icon, label, onClick?, active?, disabled? }. |
open | boolean | true | Mount/unmount with a spring entrance. |
children | ReactNode | — | Trailing content (dividers, extra controls). |