Combobox

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.

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

  • 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
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.

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.club/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…

How to use

<Cascader019 defaultCode="62.01" placeholder="Code or name" />

A sample call. The agent installs the component itself from the registry via the “Copy for AI” link.

Settings

Code
defaultCode · default: 62.01
Placeholder
placeholder · default: Code or name
Accent
accent · default: theme colour
Background
background · default: theme colour

FAQ

How do I add Code Search 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 Code Search depend on?
No npm packages beyond React and Tailwind CSS.
What can I change in Code Search?
Adapt: 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. Keep as installed: the local --vibeui-cascader-019-* palette — do not swap it for your theme tokens (bg-muted, text-muted-foreground and the like); splitting queries into numeric and textual: substring matching on codes returns junk like 47.62 for the query “62”; startsWith for codes — classifiers are hierarchical, and the start of a code is the branch.
Is Code Search 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/cascader-019.json

This 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

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…