Input
Expanding Search
A search collapsed to its magnifier: hover or focus springs the field open, and typed text keeps it open.
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
- placeholder — the hint inside the field
- hint — the line under the field; an empty string removes it
- expanded — open the field straight away instead of waiting for the cursor or focus
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/input-033?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
<Input033 placeholder="Search the catalogue" expanded={false} />A sample call. The agent installs the component itself from the registry via the “Copy for AI” link.
Settings
- Field hint
placeholder· default: Search the catalogue- Caption below
hint· default: Hover or focus the field — it expands.- Open
expanded· default: off- Accent
accent· default: theme colour- Background
background· default: theme colour
More in Input
FAQ
- How do I add Expanding 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 Expanding Search depend on?
- No npm packages beyond React and Tailwind CSS.
- What can I change in Expanding Search?
- Adapt: placeholder — the hint inside the field; hint — the line under the field; an empty string removes it; expanded — open the field straight away instead of waiting for the cursor or focus. Keep as installed: the local --vibeui-input-033-* palette — do not swap it for your theme tokens; all three expansion conditions together: :hover, :focus-within and :has(input:not(:placeholder-shown)) — without the last one the field collapses over a typed query; the transition on width alone: animating padding or font-size in the same frame makes the text shiver.
- Is Expanding 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/input-033.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
One file, zero dependencies, the --vibeui-input-033-* palette. A server component: CSS states hold the expansion, not React. The field is a label wrapping the magnifier and an input type="search", so a click anywhere puts the caret in the field. The collapsed width of 3.25rem is set in rem and matches the icon circle; three conditions expand it to 100%: :hover, :focus-within and :has(input:not(:placeholder-shown)) — the last one keeps the field open after focus leaves if text has been typed. The expanded prop sets data-expanded="true" and opens the field straight away. Only width transitions, on a 0.4s linear(…) spring, and overflow:hidden clips the text while collapsed. The theme comes from color-scheme through light-dark(), while the .dark class and data-theme="dark" declare color-scheme:dark.
Tags
- input
- search
- expand
- focus-within
- spring
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
Loading…