Tree
Tree With Node Menu
A tree where the actions live on the node itself: a right click on the row or the "⋯" button opens the node menu — rename, duplicate, delete.
React + Tailwind, shadcn-compatible: press “Copy for AI” and your Cursor or Claude Code agent installs it with the shadcn CLI.
What you can change
- the tree heading through label and the structure through nodes
- the menu items through actions: a caption, shortcut keys and the danger flag
- the hint template with the {action} and {name} placeholders
A link for your AI agent: preview, code and instructions.
Preview

Use it with AI
- 1. Copy the link.
- 2. Write to your agent in your own words and drop the link into the sentence.
- 3. The agent opens the link and installs the component from the registry.
put this on the home page as the hero:
https://vibeui.club/c/tree-011?lang=en&theme=dark
Not sure where to paste it? Step-by-step guide
Show the full instructions
What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.
Loading…
How to use
<Tree011
label="Project files"
nodes={[{ name: "North project", children: [{ name: "Budget.xlsx" }] }]}
/>A sample call. The agent installs the component itself from the registry via the “Copy for AI” link.
Settings
- Heading
label· default: Project files- Hint
hint· default: Right click a row or press "⋯". Chosen: {action} — {name}.- Accent
accent· default: theme colour- Background
background· default: theme colour
More in Tree
FAQ
- How do I add Tree With Node Menu with Cursor or Claude Code?
- Press “Copy for AI” on this page and paste it into your agent's chat. The instruction contains the shadcn CLI install command, the dependencies and what to keep, so the agent installs this exact component instead of recreating a lookalike.
- What does Tree With Node Menu depend on?
- No npm packages beyond React and Tailwind CSS.
- What can I change in Tree With Node Menu?
- Adapt: the tree heading through label and the structure through nodes; the menu items through actions: a caption, shortcut keys and the danger flag; the hint template with the {action} and {name} placeholders. Keep as installed: the local --vibeui-tree-011-* palette — do not swap it for your theme tokens; the "⋯" button next to the right click: there is no right click on a touch screen and in part of the keyboard scenarios; the HTML popover behind the menu: Escape and the outside click are written by the browser, a hand-rolled one takes months to fix.
- Is Tree With Node Menu free?
- Yes. The preview is open without an account; with a free account you can copy up to 20 components a month.
For developers
npx shadcn@latest add https://vibeui.club/r/pro/tree-011.jsonThis command needs a signed link: sign in and open “Component source” below — it issues a working link valid for 30 minutes. All install options
Technical notes
A client component: the list of expanded branches, the target node and the last chosen action live in useState. One file, no dependencies, the palette in the local --vibeui-tree-011-* variables. The menu is an HTML popover, so closing on Escape and on an outside click comes from the browser; the cursor coordinates are known only at the moment of the event and are passed through the --vibeui-tree-011-x and --vibeui-tree-011-y variables. The right click is caught by an onContextMenu handler on the row — the same handler fires on the context-menu key, so the menu is reachable without a mouse. For touch every row carries a "⋯" button that opens the same menu beneath itself. The node name sits in the menu header and in its aria-label, otherwise a person who misses the row renames the wrong thing. The tree is marked up as nested lists and a branch is expanded by a button with aria-expanded: the tree role demands arrow-key focus management, and without it the role lies to a screen reader. The open prop unfolds the menu in flow — that is the showcase and screenshot mode.
Tags
- tree
- context-menu
- popover
- files
- client
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
Loading…