NV-02Navigation
Tool Dock
An editor tool dock with a sliding selection plate, shortcut tooltips and flyouts that you can throw to any edge.
PROBuilding an editor? Canvas Toolbar is in Kokonut UI Pro
Installation
Tool Dock is a free, open-source React component in the Kokonut UI Navigation collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/toolbar.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/toolbarOr add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/toolbar.tsx.
npm install lucide-react motionUsage
import Toolbar from "@/components/kokonutui/toolbar";
export default function Example() {
return <Toolbar />;
}Props
toolsDockTool[]Default built-invaluestringThe active tool id, for a controlled dock.
defaultValuestringonValueChange(toolId: string) => voiddefaultEdgeDockEdgeDefault "bottom"The edge of the canvas the dock starts on.
onEdgeChange(edge: DockEdge) => voidshortcuts"scoped" | "global" | "off"Default "scoped"When single-key shortcuts work. scoped (default) listens only while focus is inside the canvas, or the pointer is over it and nothing else has focus; global always listens. Never while typing.
ariaLabelstringDefault "Tools"Accessible name for the toolbar.
classNamestringClasses for the canvas, the box the dock lives in.
dockClassNamestringClasses for the dock itself.
childrenReactNodeCanvas content drawn behind the dock. Defaults to a dot grid.
DockTool
idrequiredstringlabelrequiredstringiconrequiredLucideIconshortcutstringA single key that picks this tool, such as "V".
cursorstringCSS cursor for the canvas while this tool is active.
toolsDockTool[]Sub-tools, shown in a flyout. The button shows the last one picked.
DockEdge
type DockEdge = "top" | "right" | "bottom" | "left";Dependencies
| Needs | Version | Comes from |
|---|---|---|
lucide-react | ^0.556.0 | npm, installed by the CLI |
motion | ^12.23.25 | npm, installed by the CLI |
cn from lib/utils.ts | shadcn init | |
| React | 19 | Your app |
| Tailwind CSS | 4 | Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.

