Combobox
Narrow Column
A picker for a narrow column where the list truncates on the right while the selected value truncates in the middle, keeping both its head and its tail.
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 in the filter field
- options — the list of values
- defaultValue — the value selected 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.club/c/combobox-020?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
<Combobox020 headChars={14} tailChars={10} />A sample call. The agent installs the component itself from the registry via the “Copy for AI” link.
Settings
- Head characters
headChars· default: 14- Tail characters
tailChars· default: 10- Accent
accent· default: theme colour- Background
background· default: theme colour
More in Combobox
FAQ
- How do I add Narrow Column 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 Narrow Column depend on?
- No npm packages beyond React and Tailwind CSS.
- What can I change in Narrow Column?
- Adapt: label — the field caption; placeholder — the hint in the filter field; options — the list of values; defaultValue — the value selected at first render. Keep as installed: the local --vibeui-combobox-020-* palette — do not swap it for your theme tokens (bg-muted, text-muted-foreground and the like); the two different truncation strategies for the list and for the value: that is the substance of this variant, not decoration; the shorten helper with a middle ellipsis — a plain ellipsis eats the tail, and the tail is what tells similar values apart.
- Is Narrow Column 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/combobox-020.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
The component is self-contained: one file, zero dependencies, its own palette in the local --vibeui-combobox-020-* variables. Client component: the query and the value live in useState. The width is capped at 15rem — this is a table cell, a sidebar column or a side panel. The truncation is done two different ways on purpose: the list rows are cut by CSS (white-space: nowrap plus text-overflow: ellipsis), because a list is read from the start; the selected value is cut in the middle by the shorten function, because for a path, a branch or a file the tail is what matters. The full text is not lost anywhere: it sits in the title of every row, in the option's aria-label, and is printed in full below with overflow-wrap: anywhere. The monospace font is switched on for the values only — that way identical prefixes line up visually into a column.
Tags
- combobox
- narrow
- truncation
- sidebar
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
Loading…