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.
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.ru/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…
For developers
The install command lives in the “Component source” block below — a signed link that stays valid for 24 hours.
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…