Input
Expanding Search
A search collapsed to its magnifier: hover or focus springs the field open, and typed text keeps it open.
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.ru/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…
For developers
The install command lives in the “Component source” block below — a signed link that stays valid for 24 hours.
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…