Combobox
Create Option
A combobox that can create: the last row turns the query into a new label, selects it right away and marks it as new.
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
- the starting list through options and the action caption through createLabel: {query} stands for the typed text
- the new-value marker through newBadge
- the field caption through label, the placeholder through placeholder and the initial value through defaultValue
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-005?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
<Combobox005
label="Issue label"
options={["Bug", "Enhancement"]}
createLabel="Create “{query}”"
onSelect={(value, created) => console.log(value, created)}
/>A sample call. The agent installs the component itself from the registry via the “Copy for AI” link.
Settings
- Action caption
createLabel· default: Create “{query}”- New marker
newBadge· default: new- Accent
accent· default: theme colour- Background
background· default: theme colour
More in Combobox
FAQ
- How do I add Create Option 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 Create Option depend on?
- No npm packages beyond React and Tailwind CSS.
- What can I change in Create Option?
- Adapt: the starting list through options and the action caption through createLabel: {query} stands for the typed text; the new-value marker through newBadge; the field caption through label, the placeholder through placeholder and the initial value through defaultValue. Keep as installed: the local --vibeui-combobox-005-* palette — do not swap it for your theme tokens; the create row as role="option" — a side button falls out of the list's keyboard walk; the exact-match check: without it the list offers to create something that already exists.
- Is Create Option 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-005.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, no dependencies, its own --vibeui-combobox-005-* palette. Client component: useState holds the known list, the list of created items, the query, the value and the cursor. The create row is appended to the end of the row array only when the query is non-empty and there is no exact match; it is a full role="option", so it is reached with the arrows and Enter rather than by a separate button off the keyboard path. What gets created goes into known and receives a badge — the person sees that the list changed because of them. aria-selected on the create row is always false: only an existing value counts as selected. The row is set off by a dashed rule and by colour, so that it is not pressed blindly instead of a match.
Tags
- combobox
- create
- tags
- keyboard
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
Loading…