Cascader

Code Search

Picking a classifier code by search: a numeric query matches the start of the code, a textual one matches the name, and every result carries its own path in the hierarchy.

What you can change

  • label — the field caption; placeholder — the hint text inside the field
  • entries — the classifier itself: code, name and path as an array of strings
  • defaultCode — the code selected at first render

A link for your AI agent: preview, code and instructions.

Preview

1440pxHost theme

Use it with AI

  1. 1. Copy the link.
  2. 2. Write to your agent in your own words and drop the link into the sentence.
  3. 3. The agent opens the link and installs the component from the registry.
AI
1Pick it here

put this on the home page as the hero:

https://vibeui.ru/c/cascader-019?lang=en&theme=dark

2Paste into the chat
3Get it in your project

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-019-* variables. Client-side: the query and the chosen code live in useState. The key decision sits in useMemo: if the query consists only of digits and dots, the search matches the beginning of the code (startsWith) rather than any occurrence — otherwise the query «62» would drag in an unrelated code such as 47.62; a textual query is matched against both the name and the path. Every result row is a grid of three cells: the code in a monospace font, the name, and the path through grid-column, so the hierarchy is visible right in the results and needs no separate tree. The hint under the field is tied through aria-describedby, the list is marked role="listbox" and the rows role="option".

Tags

  • cascader
  • classifier
  • code
  • search
Component source

The same file your agent installs. Here in case you would rather copy it by hand.

Loading…