vibran

Keycap button, keyboard key button, mechanical key

Portuguese name: Botão tecla de teclado

A button built like a mechanical keyboard key, with a cap, side wall and base. Pressing it sinks the cap and springs it back. With data-tecla it answers the real key: press Enter, Esc or Ctrl K and the key sinks on screen.

Preview of Keycap button, keyboard key button, mechanical key running live
Copy the promptAdjust colors and speed

When to use it

Dashboards, tools, editors, shortcut pages and developer product sites, where the keyboard shortcut is part of the action. Use data-tecla with Enter, Escape, a letter or mod+letter (Ctrl or Cmd), and a <small> inside the button to show the key. The shortcut does not fire while someone is typing in a field, except Ctrl/Cmd combinations. Turn on data-som="sim" only when the sound makes sense.

How to add it to your site

  1. 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.
  2. Paste it into your AI: Lovable, Claude, Cursor, Bolt or v0.
  3. 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:

<button data-efeito="botao-tecla" data-tecla="Enter"><small>enter</small> Confirmar</button>

More buttons effects

All 41 buttons effects →