Skip to content
animorio
IT
Back to the library

Finishes drawer

Transitions, HoverGSAP, CSS onlyMediumCompressed weight: Demo 14 KBGSAP 28 KBFreeDownload the zip

The product page of Verdant Atelier, a made-up maker of street furniture: “Options” opens a drawer of finishes from the right (wood chips with their grain and brushed steel ones, the length, the price rolling) and the “Dune Bench” changes colour under a passing light. “Save to favourites” sends it flying in an arc into the bar, where the favourites button is born from nothing, counts and shows a small grid of what you saved, while a notice at the bottom empties its timer in five seconds. Premium Dribbble style, warm paper, near black and one yellow-green.

Rebuilt from scratch studying floema.com by Bürocratik: 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>
<!--
  "Finishes drawer" 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 finishes drawer with the bench flying into favourites</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/hanken-grotesk@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage">
    <!-- the product page of a made-up maker of benches and signs for parks and beaches. Options opens a drawer of
         finishes from the right; Save to favourites sends the bench, in the finish you chose, flying into the
         favourites button of the bar, which is born, counts and shows a small grid of what you saved -->
    <div class="shop" data-shop>
      <header class="bar" data-bar>
        <span class="brand">
          <svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true"><path d="M3 4.5l7 11 7-11"/><path d="M6.6 4.5h6.8"/></svg>
          <span class="brand__name">Verdant Atelier</span>
        </span>
        <nav class="bar__nav" aria-label="Collections">
          <a href="#" class="bar__link is-on">Urban</a>
          <a href="#" class="bar__link">Nature</a>
          <a href="#" class="bar__link">Projects</a>
        </nav>
        <div class="bar__end">
          <div class="fav-wrap">
            <button class="fav" type="button" data-fav aria-label="Favourites" aria-expanded="false">
              <span class="fav__inner" data-fav-inner>
                <span class="fav__icon" data-fav-icon>
                  <svg viewBox="0 0 16 16" aria-hidden="true"><path class="fav__heart" data-heart d="M8 13.4S2.3 9.9 2.3 6.1A3 3 0 0 1 8 4.6a3 3 0 0 1 5.7 1.5C13.7 9.9 8 13.4 8 13.4z"/></svg>
                  <span class="fav__burst" data-burst></span>
                </span>
                <span class="fav__count"><span data-count>0</span></span>
              </span>
            </button>
            <div class="peek" data-peek aria-hidden="true">
              <div class="peek__head"><span>Favourites</span><span class="peek__n" data-peek-n>1 piece</span></div>
              <div class="peek__grid" data-grid></div>
              <span class="peek__all">View all</span>
            </div>
          </div>
          <button class="bag" type="button">Bag<span class="bag__n">0</span></button>
        </div>
      </header>

      <section class="product" data-product>
        <figure class="media" data-media>
          <div class="render" data-render></div>
          <span class="render__sweep" data-sweep aria-hidden="true"></span>
          <figcaption class="media__tag">Installed at Comporta</figcaption>
        </figure>
        <div class="info">
          <p class="info__kicker">Urban collection</p>
          <h1 class="info__name">Dune Bench</h1>
          <p class="info__line">A slatted seat on a steel frame, made to stay out on promenades and dunes for a lifetime.</p>
          <p class="info__finish"><span data-finish>Natural oak, Galvanised, 160 cm</span></p>
          <p class="info__price"><span data-price>€1,680</span><span class="info__vat">VAT incl.</span></p>
          <div class="info__actions">
            <button class="btn btn--ghost" type="button" data-open>
              <svg class="btn__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M2.5 5h11M2.5 11h11"/><circle cx="10.5" cy="5" r="1.7"/><circle cx="5.5" cy="11" r="1.7"/></svg>
              <span>Options</span>
            </button>
            <button class="btn btn--solid" type="button" data-save>
              <svg class="btn__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M8 13.4S2.3 9.9 2.3 6.1A3 3 0 0 1 8 4.6a3 3 0 0 1 5.7 1.5C13.7 9.9 8 13.4 8 13.4z"/></svg>
              <span>Save to favourites</span>
            </button>
          </div>
        </div>
      </section>

      <div class="scrim" data-scrim></div>

      <aside class="drawer" data-drawer aria-hidden="true" aria-label="Options">
        <header class="drawer__head" data-part>
          <div>
            <p class="drawer__kicker">Dune Bench</p>
            <h2 class="drawer__title">Options</h2>
          </div>
          <button class="drawer__close" type="button" data-close aria-label="Close options">
            <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4 4l8 8M12 4l-8 8"/></svg>
          </button>
        </header>
        <div class="drawer__body">
          <div class="group" data-part>
            <p class="group__head"><span>Wood</span><span class="group__val" data-val="wood">Natural oak</span></p>
            <div class="swatches" data-group="wood">
              <span class="swatches__ring" data-ring aria-hidden="true"></span>
            </div>
          </div>
          <div class="group" data-part>
            <p class="group__head"><span>Frame</span><span class="group__val" data-val="frame">Galvanised</span></p>
            <div class="swatches" data-group="frame">
              <span class="swatches__ring" data-ring aria-hidden="true"></span>
            </div>
          </div>
          <div class="group" data-part>
            <p class="group__head"><span>Length</span><span class="group__val" data-val="size">160 cm</span></p>
            <div class="seg" data-group="size">
              <span class="seg__thumb" data-thumb aria-hidden="true"></span>
            </div>
          </div>
          <dl class="specs" data-part>
            <div><dt>Seat height</dt><dd>45 cm</dd></div>
            <div><dt>Depth</dt><dd>48 cm</dd></div>
            <div><dt>Lead time</dt><dd>6 weeks</dd></div>
          </dl>
        </div>
        <footer class="drawer__foot" data-part>
          <p class="drawer__price"><span data-price>€1,680</span><span class="info__vat">VAT incl.</span></p>
          <button class="btn btn--solid btn--wide" type="button" data-save>
            <svg class="btn__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M8 13.4S2.3 9.9 2.3 6.1A3 3 0 0 1 8 4.6a3 3 0 0 1 5.7 1.5C13.7 9.9 8 13.4 8 13.4z"/></svg>
            <span>Save to favourites</span>
          </button>
        </footer>
      </aside>

      <div class="flyer" data-flyer aria-hidden="true"></div>

      <div class="toast" data-toast role="status">
        <div class="toast__row" data-toast-row>
          <span class="toast__thumb" data-toast-thumb></span>
          <span class="toast__text">
            <span class="toast__title">Saved to favourites</span>
            <span class="toast__sub" data-toast-sub>Dune Bench in Natural oak, Galvanised, 160 cm</span>
          </span>
          <button class="toast__view" type="button">View</button>
        </div>
        <span class="toast__timer" data-timer aria-hidden="true"></span>
      </div>
    </div>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.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 “Finishes drawer” 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 ground with a fine grain and a light from above sits the window of a shop: the bar with “Verdant Atelier”, three collections and “Bag”, then the page of the “Dune Bench”. The bench is drawn with gradients: four wooden slats with their grain and dark gaps, the end in shadow, four brushed steel legs with a streak of light and plates at the feet, the soft shadow on the sand. Beside it the name, the chosen finish, the price and two buttons. “Save to favourites” lights up, presses down and comes back on a spring: a copy of the bench lifts off the picture by a breath and flies in an arc to the bar, shrinking and rounding off. In the bar the yellow-green favourites button is born from nothing (width and scale from zero), its heart fills and bounces, a thin ring widens and fades, and underneath the small grid opens with the saved bench. At the bottom the dark notice rises with its thumbnail and a yellow line that empties in five seconds. Then “Options”: the page darkens and the drawer comes in from the right; inside, the wood and steel chips, the length and the measures rise one after the other. Burnt cedar, Black steel and 200 cm are chosen: the ring jumps to the chip with a bounce, the name changes rising, the bench takes the new colours and grows longer on a spring while a light passes over it, and the price rolls to 2,320 euros. “Save to favourites” closes the drawer and the dark bench flies into the bar: the number rolls to 2, the small grid recomposes in two and the notice changes. Then everything goes back to the start and the round begins again.

How it works

The drawer like Floema’s

The scrim goes from opacity 0 to 1 in SHADE seconds (0.7) with expo.inOut; the panel starts OPEN_DELAY (0.2 s) later, from xPercent START_X (110) and opacity 0.5, and reaches 0 and 1 in OPEN seconds (0.9), expo.inOut too. Closing, it goes back to 110 and 0.5 in CLOSE (0.6) and only then takes visibility hidden. The position is given with gsap.set, not in the CSS: a translateX(110%) written in the stylesheet is read by GSAP as pixels and added to xPercent.

The bench drawn in percentages

The bench is a set of spans placed in per cent inside its box, so the same markup makes the big picture, the flying copy, the notice’s thumbnail and the slots of the small grid. The colours are custom properties registered with @property as <color> and the length as <percentage>: on a new finish the CSS slides them from one colour to the next, and the length with a cubic-bezier that overshoots and comes back.

The arc flight

The copy starts from the picture’s rectangle and heads for the centre of the heart in the bar. One value t from 0 to 1 in FLIGHT seconds with power2.inOut drives everything: x = dx·t, y = dy·t − ARC·distance·sin(πt) (the arc), the scale goes towards the size of the heart with t^1.4, a −7 degree tilt in the middle of the flight, the corners rounding off and the fade in the last 14 per cent.

The button born from nothing

As on the site, from 0 to 1 favourite the button goes from width 0 and scale 0 to its width and scale 1 in GROW seconds (0.3) with power2.out, and back to zero it does the opposite in 0.2 s with power2.in. The landing point is measured before the button grows: it is set for an instant at its final size, the heart’s rectangle is read and it is put back, all in the same frame.

The notice with its timer

The notice rises 12 pixels in 0.55 s with expo.out (the site’s .19,1,.22,1 curve is expo.out) and its line goes from scaleX 1 to 0 in TIMER seconds, linear; at the end the notice drops and fades. If another one arrives while it is open only the content changes and the timer starts again; with the mouse over it the timer stops.

Values to change

NameFileDefaultWhat it changes
OPENscript.js0.9Seconds the drawer takes to slide in.
OPEN_DELAYscript.js0.2Seconds the drawer waits after the page starts to darken.
SHADEscript.js0.7Seconds the page behind takes to darken.
CLOSEscript.js0.6Seconds the drawer takes to slide out.
START_Xscript.js110Where the drawer starts, in per cent of its own width.
TIMERscript.js5Seconds the notice stays while its line empties.
FLIGHTscript.js0.85Seconds the bench takes to fly into favourites.
ARCscript.js0.32How much the flight bends, as a share of the distance.
GROWscript.js0.3Seconds the favourites button takes to be born.
SPRINGscript.js1.6How far the ring, the count and the heart overshoot.
LOOPscript.jstrueLeft alone, repeats the whole round.

Try them in the Playground

When to use it

For the product page of a shop with variants: furniture, lighting, bicycles, eyewear, made-to-measure clothes, but also choosing a hotel room or an event seat. The drawer holds the options without leaving the page, the flight shows where the saved thing went and the notice with its timer confirms without stopping anyone.

On phones

The same movements and the same timings. In the narrow preview the page goes into a column (the picture above, the name and buttons below), the bar’s collections and the sentence go away, the drawer takes almost the whole width and the chips, buttons and gaps follow the height too (vh and clamp). The flight is measured each time from the real rectangles, so it lands on the heart at any size.

With reduced motion

No movement: the drawer and the scrim fade in already in place, the bench does not fly and the favourites button fades in with its heart filled, the notice fades and its line stays full for five seconds, the bench’s colours change without the passing light and the price changes at once.

Pitfalls

  • A translateX(110%) in the drawer’s CSS is read by GSAP as x in pixels: with xPercent 0 the drawer stays outside. The starting position must be given with gsap.set({ xPercent: 110 }).
  • The flight’s landing point must be measured with the button already at its final size: measured while it is being born (scale 0, width 0) the heart’s rectangle is a point in the wrong place.
  • The colour properties must be registered with @property to slide: without it a custom property changes at once and the gradient jumps.
  • The button being born has width 0 but its content is absolutely placed: the final width is read from the content’s offsetWidth, which does not depend on the container.

Libraries

GSAP 3.15.0, Hanken Grotesk (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 14 KB; the libraries: GSAP 28 KB.

Testing

Tested on 2 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