Skip to content
animorio
IT
All components

Start wash button

Buttons, HoverGSAP, Canvas, CSS onlyMediumCompressed weight: Demo 10 KBGSAP 28 KBFreeDownload the zip

The Start wash button of a made-up smart washing machine app, in a premium style on white: the dark pill holds a small porthole with a steel ring and a reflection on the glass; pressed, the water rises with a wave, the drum starts turning faster and faster and the pill widens onto Cotton 40° · 1:28 with the time on rolling digits. A second tap, or holding it, pauses: the drum slows down and the water settles with a sway. At the end Done draws its check and the porthole empties.

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>
<!--
  "Start wash button" 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 Start wash button with the water turning in the porthole</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage">
    <!-- the Start wash button of a made-up smart washing machine app: pressed, water rises in the little porthole with
         a wave, the drum starts turning faster and faster and the pill widens to show the programme and the time left
         with rolling digits; pressed again (or held) it pauses, the drum slows down and the water settles; at the end
         Done draws its check and the porthole empties -->
    <div class="wrap" data-wrap>
      <span class="floor" aria-hidden="true"></span>
      <button class="pill" type="button" data-pill data-autoclic aria-label="Start wash, Cotton 40 degrees, 1 hour 28 minutes">
        <span class="pill__body" aria-hidden="true">
          <span class="pill__grain"></span>
          <span class="pill__glow" data-glow></span>
        </span>

        <!-- the porthole: the drum and the water on a canvas, the steel ring and the reflection on the glass in SVG -->
        <span class="port" data-port aria-hidden="true">
          <canvas class="port__inside" data-canvas width="132" height="132"></canvas>
          <svg class="port__ring" viewBox="0 0 44 44">
            <defs>
              <linearGradient id="steel" x1="0" y1="0" x2="1" y2="1">
                <stop offset="0" stop-color="#f6f8fb"/>
                <stop offset=".28" stop-color="#9aa3ae"/>
                <stop offset=".5" stop-color="#e3e7ec"/>
                <stop offset=".74" stop-color="#6d7681"/>
                <stop offset="1" stop-color="#c9ced5"/>
              </linearGradient>
              <linearGradient id="glare" x1="0" y1="0" x2="0" y2="1">
                <stop offset="0" stop-color="#ffffff" stop-opacity=".75"/>
                <stop offset="1" stop-color="#ffffff" stop-opacity="0"/>
              </linearGradient>
            </defs>
            <circle class="ring__track" cx="22" cy="22" r="20.6"/>
            <circle class="ring__progress" data-progress cx="22" cy="22" r="20.6"/>
            <circle class="ring__steel" cx="22" cy="22" r="17.4" stroke="url(#steel)"/>
            <circle class="ring__seal" cx="22" cy="22" r="15.5"/>
            <path class="ring__glare" d="M10.6 17.4a12.4 12.4 0 0 1 13.8-8.2" stroke="url(#glare)"/>
            <path class="ring__glint" d="M27.6 30.8a10.4 10.4 0 0 0 3.6-3.4"/>
          </svg>
        </span>

        <span class="face face--start" data-start>
          <span class="face__word" data-word>Start wash</span>
        </span>

        <span class="face face--run" data-run>
          <span class="run__text">
            <span class="run__line">
              <span class="run__prog" data-prog>Cotton 40°</span>
              <span class="run__sep">·</span>
              <span class="time" data-time></span>
            </span>
            <span class="run__sub"><span class="run__subin" data-sub>Washing</span></span>
          </span>
          <span class="ctrl" data-ctrl>
            <svg viewBox="0 0 24 24"><path data-bar1 d="M8.6 7 L11.2 7 L11.2 17 L8.6 17 Z"/><path data-bar2 d="M12.8 7 L15.4 7 L15.4 17 L12.8 17 Z"/></svg>
          </span>
        </span>

        <span class="face face--done" data-done>
          <svg class="done__ic" viewBox="0 0 24 24"><path data-check d="M6.4 12.6 10.2 16.2 17.6 8.4"/></svg>
          <span class="done__word">Done</span>
        </span>

        <span class="pill__edge" aria-hidden="true"></span>
      </button>
      <p class="sr" data-live aria-live="polite"></p>
    </div>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></path></svg>
  </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.

21 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 “Start wash button” 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 white background there is just a dark pill sixty pixels tall, its body fading from graphite to near black, a very fine grain, a one pixel edge catching the light along the top and soft layered shadows. On the left, set into the pill, a small porthole: the brushed steel ring with the light running round the metal, the dark seal, the domed glass darker at its edges with a wide reflection and a thread of light, and behind it the drum with its holes and three lifters; at the bottom of the glass a film of light blue water. Next to it, the words Start wash. On hover the pill lifts by a pixel, the edge thread lights up where the pointer is, the words widen on the wdth axis and the water in the porthole rocks a little. Pressed, the pill gives by a pixel and springs back; the words leave upwards and the pill widens on an elastic spring, while the water rises in the porthole with a wave that swells and calms down. The drum starts turning slowly and speeds up, dragging the water into a tilt and carrying bright bubbles round; a blue glow lights up inside the pill and in its shadow. From below come Cotton 40° · 1:28 and the Washing line, and on the right the round pause key turns in. Every minute the digits of the time roll upwards with a small bounce and a thin blue arc round the porthole shows how much is left. Holding it or tapping again, the two pause bars melt into the play triangle, the line rolls to Paused and the time dims by half: the drum slows down to a stop and the water keeps swaying, less and less, until it settles. Another tap resumes everything. Near the end the drum spins harder, the line says Spinning and the digits race to 0:00; then the pill narrows onto Done, the check draws itself in blue, the drum stops and the water sinks and drains from the porthole, the glow fades. A moment later Start wash comes back and a film of water returns to the bottom of the glass. A drawn pointer shows the whole loop on its own.

How it works

The porthole in two layers

Inside, a 44 pixel canvas (drawn at three or four times the density) redraws the glass every frame, the drum's holes and lifters turned by an angle, and the water. On top, an SVG with the steel ring (a five stop linear gradient on the stroke), the seal, the progress arc and the reflections on the glass, which stay still while the drum turns.

The water as a state

An object with level, turns per second, wave amplitude, sway and slosh is animated by GSAP; the canvas reads it and draws the surface as a tilted line plus two sines. The tilt goes against the turns, so the drum drags the water; on pause a damped slosh makes it rock until it settles.

The drum speeding up and slowing down

The turns rise with power2.in over ACCEL seconds and fall with power3.out: the angle is added up every frame (step capped at 1/30 of a second), so the rotation never jumps, even when the speed changes halfway.

The rolling digits

Each digit is a strip running from the highest down to 0 and repeating the highest at the end: going from 0 to 9 the strip moves one more place and then snaps back to the top unseen. The tens of the minutes have their own strip up to 5.

One pill, three faces

Start wash, the programme with the time and Done are absolutely positioned next to the porthole; GSAP only changes the pill's width, measured on the real words and again on resize. The two pause bars become the play triangle with a tween of the d attribute, four points against four points.

Values to change

NameFileDefaultWhat it changes
LABELscript.jsStart washThe label of the button at rest.
PROGRAMscript.jsCotton 40°The programme written when the pill widens.
MINUTESscript.js88The minutes of the wash, written as hours and minutes (88 makes 1:28).
WATERscript.js#4fb6ffThe colour of the water, the progress arc and the check.
SPINscript.js1.2How many turns per second the drum makes while washing.
ACCELscript.js2.2How many seconds the drum takes to reach its speed.
FILLscript.js0.52How high the water rises in the porthole, from 0 to 1.
TICKscript.js0.7Every how many seconds one minute goes down, in the demo.
RUN_TICKSscript.js7After how many minutes the time races to the end, to reach Done.

Try them in the Playground

When to use it

In the app of a connected washing machine or dryer, in a smart home panel, on the site of a self service launderette or a laundry pickup service, and in any app where a button starts a long job with a countdown that can be paused.

On phones

The open pill is just over 260 pixels wide and fits comfortably at 320; a finger presses like the mouse and holding it pauses. Without hover the edge light stays still over the porthole and the water does not rock before the tap.

With reduced motion

The drum stays still and the water does not wave: the level changes in a moment, the faces swap with a fade, the digits change without rolling, pause turns into play without morphing and Done arrives already drawn.

Pitfalls

  • Going from 0 to 9 a plain strip of digits rolled back through all the others: the strip repeats the highest digit at the end, the tween moves one place on and the strip then snaps back to the top unseen.
  • With the rotation as a tween of the angle, changing speed halfway made the drum jump: the angle is added up every frame from the turns per second animated by GSAP, so it speeds up and slows down smoothly.
  • Holding to pause also fired the click on release, which resumed the wash at once: once the long press fires, the click after it is ignored.
  • The 44 pixel canvas at density 1 made the water grainy in the preview video: it is drawn at three or four times the density, with the same drawing scaled.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 13 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 components