Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Autocomplete
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Checkbox Group
- Collapsible
- Combobox
- Command
- Context Menu
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Fieldset
- Form
- Frame
- Group
- Input
- Input Group
- Kbd
- Label
- Menu
- Menubar
- Message
- Meter
- Number Field
- OTP Field
- Pagination
- Popover
- Preview Card
- Progress
- Questionnaire
- Radio Group
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Toolbar
- Tooltip
Shared
- Artifact
- Audio Player
- Canvas
- Chain of Thought
- Checkpoint
- Code Block
- Commit
- Connection
- Context
- Controls
- Edge
- Environment Variables
- Mic Selector
- Model Selector
- Node
- Node Toolbar
- Open in Chat
- Panel
- Plan
- Prompt Input
- Queue
- Reasoning
- Sandbox
- Schema Display
- Shimmer
- Snippet
- Sources
- Speech Input
- Stack Trace
- Suggestion
- Tool
- Transcription
- Web Preview
Hooks
Resources
Node Toolbar
A toolbar attached to a selected canvas node.
Transform
Select the node to reveal its toolbar.
Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.
"use client";
import { Canvas } from "@/registry/default/shared/canvas";
import { Node, NodeContent, NodeHeader, NodeTitle } from "@/registry/default/shared/node";
import { NodeToolbar } from "@/registry/default/shared/node-toolbar";
import { Button } from "@/components/ui/button";
function ToolbarNode() {
return (
<Node handles={{ source: true, target: true }}>
<NodeToolbar isVisible>
<Button size="sm" variant="ghost">
Run
</Button>
<Button size="sm" variant="ghost">
Duplicate
</Button>
<Button size="sm" variant="ghost">
Delete
</Button>
</NodeToolbar>
<NodeHeader>
<NodeTitle>Transform</NodeTitle>
</NodeHeader>
<NodeContent>
<p className="text-sm">Select the node to reveal its toolbar.</p>
</NodeContent>
</Node>
);
}
const nodeTypes = { toolbar: ToolbarNode };
const nodes = [{ data: {}, id: "transform", position: { x: 0, y: 0 }, type: "toolbar" }];
export default function Particle() {
return (
<div className="h-80 w-full">
<Canvas nodes={nodes} nodeTypes={nodeTypes} />
</div>
);
}
Installation
pnpm dlx shadcn@latest add @frontal-labs/node-toolbar
Usage
import { Toolbar } from "@/components/node-toolbar";API Reference
| Export | Props |
|---|---|
Toolbar | — |
Open the source under Manual above for the exact prop types.
On This Page