Skip to content
animorio
IT
All components

DNA sequencing button

Buttons, HoverGSAP, CanvasAdvancedCompressed weight: Demo 10 KBGSAP 28 KBFreeDownload the zip

The Run sequencing button of a genomics app, in smoked glass with a one pixel edge in a dark lab, like a Dribbble shot. On the left, in a recessed glass well, the ghost of a DNA helix turns: two thin strands, no bases yet. Pressed, a read head crosses the well and the bases arrive one pair at a time, A-T and C-G, half from above and half from below, and snap on a spring between the two strands with a flash; the gigabases read roll up and a ring fills. When the read is done a light runs along the finished helix and the button says Sequence ready, 30x coverage.

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>
<!--
  "DNA sequencing 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 Run sequencing button with the DNA helix that assembles</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 Run sequencing button of a genomics app (Helixa Labs, invented), smoked glass with a 1px edge in a dark lab.
         On the left a recessed glass well holds the ghost of a DNA double helix that turns slowly. Pressed, a read head
         crosses the well and the bases arrive one pair at a time, A-T and C-G, and snap on a spring between the two
         strands; the gigabases read roll up and a ring fills on the right. When the read is done a light runs along the
         finished helix and the button says Sequence ready, 30x coverage -->
    <div class="sq" data-wrap>
      <span class="sq__spill" data-spill aria-hidden="true"></span>
      <button class="sq__btn" type="button" data-btn aria-label="Run sequencing: sample HLX-0412, whole genome">
        <span class="sq__body" data-body>
          <span class="sq__fill" aria-hidden="true"></span>
          <span class="sq__glow" aria-hidden="true"><span class="sq__glow-light" data-glow></span></span>
          <span class="sq__shine" data-shine aria-hidden="true"></span>
          <span class="sq__sweep" aria-hidden="true"><span class="sq__sweep-band" data-sweep></span></span>
          <span class="sq__edge" aria-hidden="true"></span>
          <span class="sq__row">
            <span class="sq__well" data-well aria-hidden="true">
              <canvas class="sq__helix" data-helix></canvas>
              <span class="sq__ticks"></span>
            </span>
            <span class="sq__text" aria-hidden="true">
              <span class="sq__state" data-state>
                <span class="sq__title" data-t>Run sequencing</span>
                <span class="sq__sub"><span class="sq__sub-text" data-sample>HLX-0412 · Whole genome</span></span>
              </span>
              <span class="sq__state" data-state>
                <span class="sq__title sq__title--busy" data-t>Sequencing</span>
                <span class="sq__sub"><span class="sq__sub-text sq__num" data-read>0.00 Gb read</span></span>
              </span>
              <span class="sq__state" data-state>
                <span class="sq__title" data-t>Sequence ready</span>
                <span class="sq__sub"><span class="sq__sub-text" data-ready>30x coverage · Q38</span></span>
              </span>
              <span class="sq__state" data-state>
                <span class="sq__title" data-t data-other>Run cancelled</span>
                <span class="sq__sub"><span class="sq__sub-text" data-other-sub>Helix cleared</span></span>
              </span>
            </span>
            <span class="sq__chip" data-chip aria-hidden="true">
              <svg class="sq__arrow" data-arrow viewBox="0 0 20 20">
                <path d="M4.5 10h10.2M10.6 5.6l4.4 4.4-4.4 4.4"/>
              </svg>
              <svg class="sq__ring" data-ringwrap viewBox="0 0 34 34">
                <circle class="sq__ring-track" cx="17" cy="17" r="15.5"/>
                <circle class="sq__ring-arc" data-ring cx="17" cy="17" r="15.5" pathLength="1"/>
              </svg>
              <span class="sq__pct sq__num" data-pct>0</span>
              <svg class="sq__check" data-check viewBox="0 0 20 20">
                <path data-check-path d="M5.2 10.4l3.2 3.1 6.4-7" pathLength="1"/>
              </svg>
            </span>
          </span>
        </span>
      </button>
    </div>
    <p class="sr" aria-live="polite" data-live></p>
  </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.

30 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 “DNA sequencing 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

In a dark lab, with a cold mint light behind, a trace of violet rising from the bench and a very fine grain, a single pill button 60 pixels tall in smoked glass: its edge is a one pixel line that catches the light at the top and goes into shadow at the bottom. On the left a recessed glass well, with a little row of ticks at the bottom like the scale of a read, where the ghost of a DNA helix slowly turns: two thin strands crossing, the front one thicker and brighter than the back one. In the middle Run sequencing and under it the sample, HLX-0412 · Whole genome; on the right a glass chip with an arrow. With the mouse over it a soft light follows the pointer, the helix brightens a little and turns faster, the arrow leans forward on a spring. Pressed, the glass sinks by a pixel and springs back; the arrow slides out, a ring is born in the chip and fills with the percentage in the middle, the words become Sequencing with a band of mint light passing through them and under them the gigabases read roll up to 93.00 Gb. A read head, a band of light with a thin line, crosses the well: just ahead of it the bases arrive one pair at a time, half from above and half from below, each in the colour of its base (A mint, T blue, C violet, G orchid), snap on a spring between the strands with a little white flash, and behind it the strands light up. The bars are wide when the pair faces us and thin when it turns edge-on: it is the fake rotation of the helix, all in 2D. When the read is done the ring widens and fades, the check draws itself on a spring, a light runs along the finished helix, a diagonal reflection crosses the glass and the words say Sequence ready, 30x coverage · Q38. Pressed again, the bases let go from the right and the button is ready for another run; pressed while reading, the run is cancelled. Until someone touches it, the button goes round by itself.

How it works

Glass in layers

The button is a single box (moved only by GSAP) with absolute layers: the smoked glass with a gradient from the top, the mint light of the read anchored to the well, the light under the pointer driven by two CSS variables through gsap.quickTo, the reflection band and on top the inner shadows: the one pixel edge, the light at the top, the shadow at the bottom. The well is a recess with inner shadows and a row of ticks made with a repeating-linear-gradient.

The helix in 2D

A canvas redraws the helix every frame with gsap.ticker: the two strands are y = centre ± A·sin(kx + phase), traced in two pixel pieces. Depth is the cosine: the pieces behind are drawn first, thinner and dimmer, then the bases, then the pieces in front. Each base pair is two bars in the colour of its base, and their width follows |sin|: wide when the pair faces us, thin when it is edge-on. So the rotation shows without a crumb of 3D.

Bases that snap in

Each pair has three numbers, a1, a2 and flash, moved by GSAP. The top half comes from outside the well with an elastic.out (the offset is (1 − a)·height, and the elastic's overshoot takes it a hair past the centre and back), the bottom half 50 ms later, and the flash lightens the bar towards white at the moment they bond. Each pair's arrival time is worked out by inverting the read head's power1.inOut ease, so every pair snaps in right in front of it.

Reading and numbers

An object R with p from 0 to 1 drives the ring (stroke-dashoffset with pathLength 1), the percentage and the gigabases read (coverage times genome size, in tabular figures so they do not jitter). The read head is a band of gradient light with a one pixel line; behind it the strands and bases go from dim to full with a soft 14 pixel edge.

Going round by itself

A fake light comes in, moves over the button, presses and starts the read; after HOLD seconds on Sequence ready the bases let go from the right and the loop starts again. At the first real touch the loop stops. Everything starts from the load event, so poster and video always land on the same moment; the sequence of bases comes from a generator with a fixed seed.

Values to change

NameFileDefaultWhat it changes
SAMPLEscript.jsHLX-0412The sample on the small line at rest.
GENOMEscript.js3.1The genome size, in gigabases.
COVERAGEscript.js30The coverage when the read is done (30x: every base read 30 times).
RUNscript.js4.2How many seconds the read takes.
PAIRSscript.js13How many base pairs the helix shows.
TURNSscript.js1.6How many turns of the helix fit in the well.
SPINscript.js1How fast the helix turns: 0.3 slow, 2.5 fast.
SPRINGscript.js1How springy the moves are: 0.4 calm, 2 very bouncy.
HOLDscript.js2.8In the loop, how many seconds it stays on Sequence ready before clearing.
AUTOscript.jstrueThe button goes round by itself until someone touches it.

Try them in the Playground

When to use it

For a genomics, biotech or lab app or dashboard, a DNA testing site, a research or medical portal: it is the button that starts a long analysis and shows it at work, with the progress, the rolling number and a credible result at the end. It also suits any start of a job that takes time (an analysis, a processing run, a computation).

On phones

On the phone the button is at most 88% of the screen wide, the helix well narrows with the width (still thirteen pairs, just closer) and long words end with an ellipsis; there is no hover, so the light under the finger turns on at the touch and the rest is the same.

With reduced motion

Nothing moves: the helix stays still, the bases fade in at their place as the read head passes, the ring and the numbers change in place, the arrow, the ring and the check swap with a fade and the light grows only in strength.

Pitfalls

  • With the base pairs at fixed intervals, the read head with its power1.inOut ease overtook them in the middle and lagged at the sides: the bases appeared far from it. Each pair's arrival is worked out by inverting the ease, so they always snap in right in front of the head.
  • The canvas size read with getBoundingClientRect changed when GSAP squashed the button on press, and the helix stretched: clientWidth and clientHeight are read instead, which ignore transforms, and refreshed by a ResizeObserver.
  • A round flash at the bonding point looked like a glowing dot (not allowed): the flash is the bar itself lightening towards white and back to its colour.
  • With reduced motion the canvas was redrawn every frame even when still: there it is redrawn only while GSAP is moving the helix numbers (gsap.isTweening).

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 4 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