vibran

Expanding cards

Also called: accordion panels / flex gallery

A row of panels where one is open and the others stay narrow, showing only a vertical title. Hover, tap or use the arrow keys to open another and the space smoothly changes hands. On phones the panels stack.

Preview of Expanding cards running live
Copy the promptAdjust colors and speed

When to use it

Good for services, courses, destinations, projects and categories, when each item has a strong image and short text. Set the image or background color on each panel; content shown only when open goes inside data-detalhe. Use data-gatilho="clique" if accidental hovering is a problem, and data-auto to cycle on its own in showcases.

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:

<div data-efeito="paineis-expansivos" style="height:420px"><div data-titulo="Violão"><div data-detalhe><h3>Violão</h3><p>Texto do painel aberto</p></div></div><div data-titulo="Teclado">...</div></div>

More cards effects

All 27 cards effects →