Button that expands into an email field
Portuguese name: Botão que vira campo de e-mail
A pill with the invitation (Get the newsletter). On click it widens into an email field with the send button inside. An invalid email shakes and warns; a valid one shows a spinner and then a check with the confirmation.

When to use it
Email capture in a hero, footer or end of an article, when an open form would take too much room. The field only appears once the person shows interest, which keeps the page cleaner. Say in the button what they get ("Notify me about the bake"), not "Submit". Without listening to the "enviar" event it only simulates; in production, connect it to your email service.
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="botao-email" data-rotulo="Receber o boletim" data-placeholder="seu@email.com" data-ok="Pronto, confira sua caixa de entrada."></form>
<script>
document.querySelector("[data-efeito=botao-email]").addEventListener("enviar", (e) => {
e.preventDefault();
fetch("/api/inscrever", { method: "POST", body: JSON.stringify({ email: e.detail.email }) })
.then(e.detail.ok, () => e.detail.erro("Não deu para inscrever agora."));
});
</script>
More buttons effects
- 3D push buttonBotão 3D
- Rainbow buttonBotão arco-íris
- Loading to success buttonBotão carregando e sucesso
- Cursor-aware light border button, conic border follows mouseBotão com borda de luz que aponta para o mouse
- Gradient border buttonrotating border
- Marching ants button, animated dashed border buttonBotão com borda tracejada em marcha
- Shimmer buttonBotão com brilho passando
- Stroke draw buttonSVG border animation