Cascader
Chart Of Accounts
Picking an account from a chart of accounts: the code assembles segment by segment, unfilled parts show as dots, and a posting cannot be attached to an account group.
What you can change
- label — the heading above the code
- accounts — the chart itself as a tree with codes, names and an archived flag
- defaultPath — the path expanded at first render
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/cascader-014?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
The component is self-contained: one file, zero dependencies, its own palette in the local --vibeui-cascader-014-* variables. Client-side: the path through the tree and the chosen code live in useState. The tree is described by a recursive type with the fields code, name, children and archived; the current level is computed by walking path on every render, so there is no separate «current nodes» state and nothing can fall out of sync. At the top sits the assembled code in a monospace font: unfilled segments are shown as dots through <i>, so the shape of the code is visible in advance. The breadcrumbs are buttons that return the path to the required depth. Nodes with children open the next level, leaves are selectable and marked with aria-current, and archived accounts get a native disabled.
Tags
- cascader
- accounting
- codes
- tree
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
Loading…