vibran

Product card with color swatches

Also called: spin

A product card with color swatches: picking one opens the background as a circle from the swatch, the product does a full spin and name and price swap. You can also spin the product by dragging it.

Preview of Product card with color swatches running live
Copy the promptAdjust colors and speed

When to use it

Good for clothing, shoe, plant pot, phone case or any product with color variants. The product art can be an SVG using var(--produto-cor) in fill, or a photo per color swapped on the "cor" event. Each swatch takes data-cor and, optionally, data-nome, data-preco and data-fundo. The "cor" event reports which one was picked.

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="cartao-produto"><div data-produto><svg>...usa fill: var(--produto-cor)...</svg></div><h3>Vaso</h3><span data-nome>Terracota</span><button data-cor="#c8643c" data-nome="Terracota"></button><button data-cor="#e9e4d8" data-nome="Areia"></button></div>

More cards effects

All 27 cards effects →