Skip to content
animorio
IT
Back to the library

Flavour product cards

HoverGSAP, CSS onlyMediumCompressed weight: Demo 8.8 KBGSAP + CustomEase 31 KBFreeDownload the zip

A row of four product cards from Smoulder, a made-up brand of spicy almonds and peanuts, on a warm pink background: each has the pouch drawn like a render, the flavour name in a condensed grotesque, the price, the heat and a round «view product» badge in a thin line. Hovering the card, the badge turns past a full circle and settles, fills from the centre with the flavour colour and follows the pointer like a magnet; the pouch wiggles, the card rises on a soft layered shadow. Pressed, the badge squashes and springs back. A premium, Dribbble-shot style.

Rebuilt from scratch studying henrietta.wearetattoodigital.com by Tattoo Digital: the idea is theirs; code, copy and images are ours. Read how it’s made

The code

A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.

<!doctype html>
<!--
  "Flavour product cards" from Animorio · https://animorio.com
  License: free on your own sites and your clients’ sites, paid work included.
  Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>The flavour cards with the badge that spins round and fills with colour</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/archivo@5.3.0/wdth.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- four product cards of Smoulder, a made-up brand of spicy almonds and peanuts. Hovering a card lifts it on a
       soft layered shadow, the drawn pouch wiggles and the round «view product» badge spins past a full turn and
       settles, filling from the centre with the colour of the flavour. The badge follows the pointer like a magnet
       and squashes when pressed. On touch a tap does the same. -->
  <main class="palco" data-palco>
    <section class="fila" aria-label="Smoulder flavours">

      <article class="card" data-card style="--c: #d32929; --cs: #8f1414; --on: #f6f1ec; --tinta: #f3d6cf;" data-calore="3">
        <span class="card__ombra" data-ombra aria-hidden="true"></span>
        <div class="card__corpo">
          <span class="card__luce" data-luce aria-hidden="true"></span>
          <header class="card__testa"><span class="marchio">Smoulder</span><span class="peso">5 oz</span></header>
          <div class="scena"><span class="scena__ombra" data-terra aria-hidden="true"></span><div class="busta" data-busta data-gusto="Kimchi" data-frutto="Almonds"></div></div>
          <div class="piede">
            <div class="piede__testo">
              <h2 class="nome">Kimchi</h2>
              <p class="sotto">Fermented chili almonds</p>
              <p class="prezzo">$9.50</p>
              <p class="calore" aria-label="Heat 3 of 4"><span>Heat</span><i></i><i></i><i></i><i></i></p>
            </div>
          </div>
          <a class="bollino" href="#kimchi" data-bollino aria-label="View product: Kimchi almonds">
            <span class="bollino__molla" data-molla>
              <span class="bollino__pieno" data-pieno></span>
              <svg class="bollino__giro" data-giro viewBox="0 0 100 100" aria-hidden="true"></svg>
              <svg class="bollino__freccia" data-freccia viewBox="0 0 24 24" aria-hidden="true"><path d="M7 17L17 7M9.5 7H17v7.5" /></svg>
            </span>
          </a>
        </div>
      </article>

      <article class="card" data-card style="--c: #8b231a; --cs: #521009; --on: #f6f1ec; --tinta: #ecd3cb;" data-calore="4">
        <span class="card__ombra" data-ombra aria-hidden="true"></span>
        <div class="card__corpo">
          <span class="card__luce" data-luce aria-hidden="true"></span>
          <header class="card__testa"><span class="marchio">Smoulder</span><span class="peso">5 oz</span></header>
          <div class="scena"><span class="scena__ombra" data-terra aria-hidden="true"></span><div class="busta" data-busta data-gusto="Nashville Hot" data-frutto="Peanuts"></div></div>
          <div class="piede">
            <div class="piede__testo">
              <h2 class="nome">Nashville Hot</h2>
              <p class="sotto">Cayenne honey peanuts</p>
              <p class="prezzo">$8.50</p>
              <p class="calore" aria-label="Heat 4 of 4"><span>Heat</span><i></i><i></i><i></i><i></i></p>
            </div>
          </div>
          <a class="bollino" href="#nashville-hot" data-bollino aria-label="View product: Nashville Hot peanuts">
            <span class="bollino__molla" data-molla>
              <span class="bollino__pieno" data-pieno></span>
              <svg class="bollino__giro" data-giro viewBox="0 0 100 100" aria-hidden="true"></svg>
              <svg class="bollino__freccia" data-freccia viewBox="0 0 24 24" aria-hidden="true"><path d="M7 17L17 7M9.5 7H17v7.5" /></svg>
            </span>
          </a>
        </div>
      </article>

      <article class="card" data-card style="--c: #f45016; --cs: #b13207; --on: #f6f1ec; --tinta: #f6dccb;" data-calore="3">
        <span class="card__ombra" data-ombra aria-hidden="true"></span>
        <div class="card__corpo">
          <span class="card__luce" data-luce aria-hidden="true"></span>
          <header class="card__testa"><span class="marchio">Smoulder</span><span class="peso">5 oz</span></header>
          <div class="scena"><span class="scena__ombra" data-terra aria-hidden="true"></span><div class="busta" data-busta data-gusto="Buffalo" data-frutto="Almonds"></div></div>
          <div class="piede">
            <div class="piede__testo">
              <h2 class="nome">Buffalo</h2>
              <p class="sotto">Vinegar cayenne almonds</p>
              <p class="prezzo">$9.50</p>
              <p class="calore" aria-label="Heat 3 of 4"><span>Heat</span><i></i><i></i><i></i><i></i></p>
            </div>
          </div>
          <a class="bollino" href="#buffalo" data-bollino aria-label="View product: Buffalo almonds">
            <span class="bollino__molla" data-molla>
              <span class="bollino__pieno" data-pieno></span>
              <svg class="bollino__giro" data-giro viewBox="0 0 100 100" aria-hidden="true"></svg>
              <svg class="bollino__freccia" data-freccia viewBox="0 0 24 24" aria-hidden="true"><path d="M7 17L17 7M9.5 7H17v7.5" /></svg>
            </span>
          </a>
        </div>
      </article>

      <article class="card" data-card style="--c: #efc415; --cs: #b98f00; --on: #2d2a26; --tinta: #f5e8bd;" data-calore="1">
        <span class="card__ombra" data-ombra aria-hidden="true"></span>
        <div class="card__corpo">
          <span class="card__luce" data-luce aria-hidden="true"></span>
          <header class="card__testa"><span class="marchio">Smoulder</span><span class="peso">5 oz</span></header>
          <div class="scena"><span class="scena__ombra" data-terra aria-hidden="true"></span><div class="busta" data-busta data-gusto="Lemon Pepper" data-frutto="Peanuts"></div></div>
          <div class="piede">
            <div class="piede__testo">
              <h2 class="nome">Lemon Pepper</h2>
              <p class="sotto">Zest and pepper peanuts</p>
              <p class="prezzo">$8.50</p>
              <p class="calore" aria-label="Heat 1 of 4"><span>Heat</span><i></i><i></i><i></i><i></i></p>
            </div>
          </div>
          <a class="bollino" href="#lemon-pepper" data-bollino aria-label="View product: Lemon Pepper peanuts">
            <span class="bollino__molla" data-molla>
              <span class="bollino__pieno" data-pieno></span>
              <svg class="bollino__giro" data-giro viewBox="0 0 100 100" aria-hidden="true"></svg>
              <svg class="bollino__freccia" data-freccia viewBox="0 0 24 24" aria-hidden="true"><path d="M7 17L17 7M9.5 7H17v7.5" /></svg>
            </span>
          </a>
        </div>
      </article>

    </section>

    <svg class="puntatore" data-puntatore viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3l13.5 8.2-6.1 1.3 3.4 6.6-2.6 1.3-3.4-6.6L5 18.4z" /></svg>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/CustomEase.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/CustomWiggle.min.js"></script>
  <script src="script.js"></script>
</body>
</html>

Playground

Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.

59 values to change

Or ask your AI assistant for it

With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:

Take “Flavour product cards” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On a warm pink background there are four cream cards with rounded corners: at the top the Smoulder mark and the weight, 5 oz; in the middle, on a panel tinted with the flavour colour, the drawn pouch with its crimped top, the hang slot, the tear notches, the glossy streak and the label with a chili; below, the name (Kimchi, Nashville Hot, Buffalo, Lemon Pepper), a line that says what is inside, the price, the heat in four bars and, on the right, the round badge in a thin line with «VIEW PRODUCT» written along the circle and a diagonal arrow in the middle. At rest the badge is turned 15 degrees. Hovering the card, the badge makes a full turn, goes a little past it and comes back, while a disc in the flavour colour grows from the centre with a small bounce, the words and arrow turn light (dark on the yellow) and the arrow, which does not turn with the ring, straightens to point right. Meanwhile the card rises 8 pixels on a soft layered shadow, the pouch lifts and swings five times, less and less, its shadow on the ground tightens, a sheen sweeps over it, the heat bars fill one after another and a light follows the pointer. The badge follows the pointer like a magnet and, leaving, springs back to its place while the turn rewinds. Pressed, it squashes to 90% and springs back. Left alone, a drawn arrow visits the cards one at a time and presses each badge.

How it works

Four layers for one badge

The link is the magnet (x and y), inside it the spring (scale, for the press), and inside that three siblings: the colour disc (scale 0 to 1), the SVG ring with the circular text (rotation) and the arrow. Each one has a single transform, so GSAP overwrites none of them; and the arrow sits outside the ring, so it stays upright with no counter-rotation.

The turn that overshoots

One paused timeline per card: the ring goes from 15 to 375 degrees in 0.5 s with back.inOut(2.5), which passes the turn and comes back; the disc grows from the centre with back.out(1.5) just after the start; the link colour (the text and arrow use currentColor) turns light; the arrow turns 45 degrees. Entering play(), leaving reverse(), a little faster.

The text on the circle

A textPath on a circle of radius 33 with textLength equal to the circumference and lengthAdjust spacing: «VIEW PRODUCT · VIEW PRODUCT ·» closes the circle exactly at any size, and since it turns with the ring it is what shows the rotation.

The magnet

On every move the badge goes towards the pointer by (pointer - centre) × 0.32, at most 14% of the card, in 0.4 s power2.out; leaving, it returns to zero in 0.7 s elastic.out(1, 0.4). The tweens use overwrite: "auto", not true: true would also kill the colour change of the timeline on the same element.

The wiggling pouch

CustomWiggle.create with wiggles 5 and type easeOut gives a curve that swings back and forth five times, less and less, and ends at zero: a rotation tween to 7 degrees with that curve swings the pouch and leaves it upright. The pivot is at the bottom (50% 96%), like an object standing on a table.

Values to change

NameFileDefaultWhat it changes
SPIN_TIMEscript.js0.5Seconds of the badge turn (the site uses 0.5).
SPIN_BACKscript.js2.5How far the turn goes past before it settles (the site uses back.inOut(2.5)).
REST_ANGLEscript.js15Degrees of the badge at rest; on hover it goes to this plus 360.
FILL_TIMEscript.js0.42Seconds of the colour filling the badge from the centre.
MAGNETscript.js0.32How much the badge follows the pointer (0 = not at all).
LIFTscript.js8Pixels the card rises on hover.
WIGGLE_ANGLEscript.js7Degrees of the pouch wiggle (the site uses 7).
WIGGLESscript.js5How many times the pouch swings back and forth (the site uses 5).
WIGGLE_TIMEscript.js1.1Seconds of the wiggle.
PRESSscript.js0.9How small the badge gets when pressed (the site uses 0.9).
AUTOPLAYscript.jstrueLeft alone, a drawn pointer visits the cards one by one and presses each badge.

Try them in the Playground

When to use it

For the shop window of an online store with a few well-made products: snacks, sauces, coffee, cosmetics, a line of flavours or colours. The round spinning badge is a more playful invitation into the product page than a plain button, and the colour of each flavour makes it recognisable.

On phones

The cards go into a two by two grid measured on width and height, all inside the screen; everything in a card is in container units, so it scales together. A tap on a card does what the hover does (and switches the others off), a tap outside switches them all off; the badge squashes on touch.

With reduced motion

No turns, magnet, wiggles or rising cards: the badge colour and the shadow fade in. No drawn pointer: the cards light up one at a time with fades.

Pitfalls

  • With overwrite: true the magnet tween on the link also killed the timeline colour change on the same link: the text stayed dark on the red disc. It needs overwrite: "auto", which only removes the shared properties.
  • A spinning circle cannot be seen: it is the text on the circle that shows the turn. That is why the text turns with the ring, and the arrow, which must stay upright, is a sibling of the ring, not a child.
  • The pouch gradients take their colour from a CSS variable of the card, but a gradient in defs inherits variables from where it is written, not from what uses it: each card has its own pouch with its own ids.

Libraries

GSAP 3.15.0, CustomEase 3.15.0, CustomWiggle 3.15.0, Archivo (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 8.8 KB; the libraries: GSAP + CustomEase 31 KB.

Testing

Tested on 15 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.

All animations