vibran

Liquid glass switch, glass toggle

Portuguese name: Interruptor de vidro líquido

An on/off switch with a thick glass knob that is larger than the track. Pressing stretches it like a droplet, and turning it on lights the track in the chosen colour. You can click it or drag the knob.

Preview of Liquid glass switch, glass toggle running live
Copy the promptAdjust colors and speed

When to use it

Settings screens, store dashboards and app cards over colourful or photo backgrounds. Every switch needs a visible label next to it or an aria-label, since the button itself has no text. Listen to the "mudou" event (el.addEventListener) to save the choice; the whole size scales with the button's font-size.

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="interruptor-vidro-liquido" data-cor="verde" aria-label="Avisos no WhatsApp"></button>

More buttons effects

All 41 buttons effects →