Expanding search bar
Portuguese name: Busca que se expande
A round magnifier button that opens into a search field on click, with a suggestion list that filters as you type and works with arrow keys. Esc or clicking outside collapses it when empty.

When to use it
A navigation bar with little room: store, blog, documentation. On phones keep the magnifier collapsed and open it by tap. data-sugestoes takes a fixed list; for server suggestions, listen for the busca event and fill the list yourself. The open width stays reserved, so size --busca-largura to fit.
How to add it to your site
- Copy the prompt in the gallery. It comes with the effect's name and the full code. The prompt text is written in Portuguese, and AI builders handle that fine.
- Paste it into your AI: Lovable, Claude, Cursor, Bolt or v0.
- Done: the AI adds the effect to your project, just like you saw it here.
Use it in HTML
The effect is plain JavaScript, no library. Just put the data-efeito attribute on the element:
<form data-efeito="busca-expansivel" data-sugestoes="Corte,Barba,Sobrancelha"><input type="search" aria-label="Buscar serviços" placeholder="Buscar serviços"></form>
More inputs effects
- Star ratingreview stars
- Glowing inputAI prompt box
- Line draw inputunderline input animation
- Floating label inputCampo com rótulo flutuante
- Tag inputchips input
- Credit card formflip card on CVV
- OTP inputverification code input
- Liquid toggle switchgooey switch