Skip to content
animorio
IT
All components

Steak doneness picker

Pickers, Hover, SVGGSAP, CSS onlyMediumCompressed weight: Demo 9.1 KBGSAP 28 KBFreeDownload the zip

The doneness picker in the app of Halden Grill, a made-up steakhouse, alone on black in the premium product style. Five levels on a track, to tap or drag: above, the cross-section of the ribeye shows the centre the kitchen will cook, a red core that shrinks and turns from pink to grey inside the seared crust; the core temperature rolls digit by digit, the ember marker slides on a thin scale and the ticks lift as it passes. While you drag, the steak cooks between levels too.

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>
<!--
  "Steak doneness picker" 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 steak doneness picker with the cross-section that changes colour</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 doneness picker of a made-up steakhouse: five levels on a track you can tap or drag; the cut of the steak
         shows the centre the kitchen will cook, the core temperature rolls and the ticks of the scale lift -->
    <section class="cook" data-cook aria-label="Doneness">
      <span class="cook__glow" data-glow aria-hidden="true"></span>

      <header class="head">
        <span class="mark" aria-hidden="true">
          <svg viewBox="0 0 24 24"><path d="M12 3.5c1.6 2.6 5.2 5 5.2 9.4a5.2 5.2 0 0 1-10.4 0c0-2.2 1.1-3.6 2.2-4.8.2 1.6.9 2.6 1.9 3.1-.4-2.8.1-5.4 1.1-7.7Z" /></svg>
        </span>
        <span class="head__txt">
          <span class="head__name" data-brand>Halden Grill</span>
          <span class="head__sub" data-cut>Dry-aged ribeye · 350 g</span>
        </span>
        <span class="price" data-price>£38</span>
      </header>

      <div class="slice" aria-hidden="true">
        <svg class="slice__svg" viewBox="0 0 320 150" data-slice>
          <defs>
            <path id="cutShape" d="M58 72 C58 40 100 22 150 22 C206 22 254 30 268 58 C282 86 264 118 224 126 C186 134 140 136 102 128 C70 121 58 100 58 72 Z" />
            <clipPath id="cutClip"><use href="#cutShape" /></clipPath>
            <linearGradient id="crustG" x1="0" y1="0" x2="0" y2="1">
              <stop offset="0" stop-color="#5b3323" />
              <stop offset="1" stop-color="#2e1912" />
            </linearGradient>
            <radialGradient id="bandG" cx="0.55" cy="0.5" r="0.6">
              <stop offset="0.55" stop-color="#a5806c" />
              <stop offset="1" stop-color="#7d5a48" />
            </radialGradient>
            <radialGradient id="coreG" cx="0.5" cy="0.46" r="0.55">
              <stop offset="0" stop-color="#d44a5c" data-core-in />
              <stop offset="1" stop-color="#b52f44" data-core-out />
            </radialGradient>
            <linearGradient id="sheenG" x1="0" y1="0" x2="1" y2="0">
              <stop offset="0" stop-color="#fff" stop-opacity="0" />
              <stop offset="0.5" stop-color="#fff" stop-opacity="0.22" />
              <stop offset="1" stop-color="#fff" stop-opacity="0" />
            </linearGradient>
            <filter id="soft" x="-20%" y="-20%" width="140%" height="140%"><feGaussianBlur stdDeviation="3.2" /></filter>
            <filter id="grain" x="0" y="0" width="100%" height="100%">
              <feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2" seed="7" result="n" />
              <feColorMatrix in="n" type="matrix" values="0 0 0 0 1  0 0 0 0 0.92  0 0 0 0 0.85  0 0 0 0.55 -0.18" />
              <feComposite in2="SourceGraphic" operator="in" />
            </filter>
            <radialGradient id="shadowG" cx="0.5" cy="0.5" r="0.5">
              <stop offset="0" stop-color="#000" stop-opacity="0.75" />
              <stop offset="1" stop-color="#000" stop-opacity="0" />
            </radialGradient>
          </defs>

          <ellipse cx="164" cy="136" rx="118" ry="12" fill="url(#shadowG)" />
          <use href="#cutShape" fill="url(#crustG)" />
          <g clip-path="url(#cutClip)">
            <use href="#cutShape" fill="url(#bandG)" transform="translate(164 78) scale(0.93 0.9) translate(-164 -78)" />
            <g data-core transform="translate(170 78) scale(0.7) translate(-170 -78)">
              <use href="#cutShape" fill="url(#coreG)" filter="url(#soft)" />
            </g>
            <path class="fat" d="M70 62 C74 44 90 34 112 31 C100 44 95 60 99 78 C102 94 96 108 84 115 C71 102 66 82 70 62 Z" />
            <g class="marble">
              <path d="M128 46 C140 54 150 52 162 60 C170 66 182 64 190 70" />
              <path d="M150 96 C164 90 176 98 190 92 C200 88 212 94 222 90" />
              <path d="M200 44 C210 50 222 48 232 56" />
              <path d="M118 104 C126 100 134 106 142 102" />
              <path d="M236 82 C242 88 248 86 254 92" />
            </g>
            <use href="#cutShape" fill="#000" filter="url(#grain)" opacity="0.5" />
            <rect class="sheen" data-sheen x="-80" y="0" width="70" height="150" fill="url(#sheenG)" transform="skewX(-18)" />
          </g>
          <use href="#cutShape" class="rim" />
        </svg>
      </div>

      <div class="read">
        <div class="read__left">
          <span class="read__name" data-name><span class="line">Medium rare</span></span>
          <span class="read__note" data-note><span class="line">Warm red centre</span></span>
        </div>
        <div class="read__right">
          <span class="temp" data-temp aria-live="polite"><span class="temp__d" data-d0><span>5</span></span><span class="temp__d" data-d1><span>5</span></span><span class="temp__u">°C</span></span>
          <span class="read__label">core temp</span>
        </div>
      </div>

      <div class="scale" aria-hidden="true">
        <div class="scale__ticks" data-ticks></div>
        <span class="scale__mark" data-mark></span>
      </div>

      <div class="track" data-track role="radiogroup" aria-label="How would you like it cooked?">
        <span class="thumb" data-thumb aria-hidden="true"><span class="thumb__face"></span></span>
        <button class="opt" type="button" role="radio" data-opt aria-checked="false">Rare</button>
        <button class="opt" type="button" role="radio" data-opt aria-checked="true">Med rare</button>
        <button class="opt" type="button" role="radio" data-opt aria-checked="false">Medium</button>
        <button class="opt" type="button" role="radio" data-opt aria-checked="false">Med well</button>
        <button class="opt" type="button" role="radio" data-opt aria-checked="false">Well</button>
      </div>

      <p class="pick" data-pick><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 1.8 9.7 5.6l4.1.4-3.1 2.8.9 4.1L8 10.8l-3.6 2.1.9-4.1L2.2 6l4.1-.4Z" /></svg><span data-picktxt>Chef’s pick for this cut</span></p>
    </section>

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

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 “Steak doneness picker” 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 black ground there is only the doneness card: at the top the ember flame of Halden Grill, the name, Dry-aged ribeye · 350 g and the price in a pill. Below, the cross-section of the ribeye: the dark crust with its grain, the grey-pink ring of cooked meat, the soft red core, the fat seam on the left and thin marbling, with a soft shadow underneath. Then the name of the level and its note, on the right the core temperature in degrees, a thin scale from 48 to 74 degrees with the ember marker, and the track with the five levels: Rare, Med rare, Medium, Med well, Well. Tap a level and the dark glass thumb slides there on a spring that overshoots by a hair and comes back; the core shrinks and changes colour, the temperature digits roll up or down, the name and the note roll, the cut dips by a pixel and comes back, the core breathes and a soft sheen crosses the meat. Drag the thumb and everything follows the finger without steps: the steak cooks between levels, the temperature climbs degree by degree and the ticks near the marker lift like a wave. At the bottom, under Med rare, the chef’s star; on the other levels the resting minutes. It works from the keyboard with the arrows. Left alone, a drawn pointer taps Rare, drags all the way to Well and comes back to Med rare.

How it works

One position

Everything comes from one continuous number from 0 to 4: the whole part picks the two nearby levels, the fraction blends them. So the thumb, the core, the colours, the temperature and the marker always agree, even halfway through a drag.

The cross-section

The shape of the ribeye is a single path in defs, used four times: the crust, the cooked ring scaled to 93%, the core scaled by the level and blurred with feGaussianBlur so the edge is soft like real meat, and the grain from feTurbulence clipped to the shape.

The colours of the core

The core is a radial gradient: its two stop-colors are worked out on every frame with gsap.utils.interpolate between the colours of the two nearby levels, and the scale of the core with a lerp.

The spring and the digits

On release GSAP takes the position to the nearest whole number with back.out, the core breathes on an elastic and a skewed rectangle with a white gradient crosses the cut. Each digit of the temperature has its own column and only rolls when it changes, up when it rises.

Values to change

NameFileDefaultWhat it changes
STARTscript.js1The level chosen at the start (0 rare, 4 well done).
SPRINGscript.js1How lively the thumb’s spring is (0 none, 2 a lot).
SETTLE_TIMEscript.js0.7How many seconds the thumb and the cut take to settle on a level.
SHEENscript.js1How bright the sheen that crosses the meat is (0 off).
CHEF_PICKscript.js1The level the chef recommends, with the star (-1 none).
BRANDscript.js"Halden Grill"The name of the restaurant.
LOOPscript.jstrueLeft alone, the drawn pointer does the round again.

Try them in the Playground

When to use it

In the app or site of a steakhouse, a grill house or a restaurant with table ordering, in a food delivery cart, in an ordering kiosk: anywhere people choose the doneness and it helps to see what will arrive on the plate.

On phones

The card narrows to 92 vw, the cut and the track have their height in clamp with vh, so everything fits the phone box; the thumb is dragged with a finger (touch-action: none on the track) and below 460 pixels of height the bottom line is hidden.

With reduced motion

No springs and no bounces: the thumb jumps to the chosen level, the core and the colours fade across, the digits and labels change with fades, no sheen. The drawn pointer is not shown and taps the levels instead of dragging.

Pitfalls

  • With a draggable thumb and buttons underneath, a tap chose twice (pointerup and then click): the buttons’ click only counts from the keyboard (event.detail equal to 0), taps are handled by the track.
  • Without blur the core of the meat looked like a sticker: with feGaussianBlur on the core alone, clipped by the shape, the passage to grey becomes that of a real steak.
  • While dragging the digits changed on every frame and piled up: each column removes the old digits still in flight before letting a new one in.
  • Absolute labels inside a grid in a flex row had zero width and disappeared: the left column needs flex: 1 and min-width: 0.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 9.1 KB; the libraries: GSAP 28 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 components