Skip to content
animorio
IT
Back to the library

Nail polish picker

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

Choosing the colour before booking a manicure: five bottles of polish in a row and five nails above. The chosen bottle lifts out of the row, the colour rises on the nails one after the other over the previous one, a glint runs across them and the shade’s name rolls. A switch goes from glossy to matte and the button books with that colour.

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>
<!--
  "Nail polish 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>Nail polish picker of the salon with the bottles that lift and the nails that take the 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">
    <!-- choosing the colour before booking a manicure: the chosen bottle lifts out of the row, the five nails take
         the colour one after the other from the tip of the brush, a gloss runs over them and the shade's name rolls -->
    <section class="np" data-np aria-label="Choose your nail colour">
      <header class="np__head">
        <div><span>Gel manicure · 45 min</span><h1>Pick a colour</h1></div>
        <button class="finish" type="button" data-finish aria-pressed="false"><span data-finish-word>Glossy</span></button>
      </header>

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

      <div class="shade">
        <p class="shade__name roll"><strong data-name></strong></p>
        <p class="shade__note roll"><span data-note></span></p>
      </div>

      <div class="bottles" data-bottles role="radiogroup" aria-label="Shades"></div>

      <button class="book" type="button" data-book><span class="roll"><span data-word>Book with this colour</span></span></button>
    </section>
    <p class="sr" data-live aria-live="polite"></p>

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

29 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 “Nail polish 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 powder pink background, a white card: “Gel manicure · 45 min”, “Pick a colour” and on the right the finish pill (“Glossy”). Below, five drawn nails in a row, the tallest in the middle, with their highlight; then the shade’s name with a line describing it, five bottles with a black cap and their shadow, and the dark “Book with this colour” button. The chosen bottle sits higher than the others. On hover a bottle leans; pressed, it rises on a spring and its shadow tightens, the name rolls, and the new colour rises on the nails from the bottom, one after the other from the left, covering the old one: each nail hops and a strip of light runs across it. The card’s glow and the background take the tint too. The finish pill turns the highlights off or back on; the button confirms with the shade’s name.

How it works

Two layers per nail

Each nail is an SVG path also used as a clipPath: inside there are a rectangle with the previous colour and one with the new colour starting from below. Only the y attribute of the second is animated, with power3.out; at the end the first takes the new colour and the second goes back down, ready for the next.

The bottle

The bottle’s body rises LIFT pixels with back.out(2.6), the others go back to zero with power3.out; the shadow is an ellipse that tightens to 0.7 when the bottle is up.

The glint

A white rectangle tilted 18 degrees crosses each nail from top to bottom while fading, slightly staggered; with the matte finish it does not start and the fixed highlights drop to opacity 0.1.

Values to change

NameFileDefaultWhat it changes
SHADESscript.js[["Rosewood", "#c2334d", "Deep red, a classic"], ["Peach Sorbet", "#f08a6b", "Warm coral for summer"], ["Soft Lilac", "#a98be0", "Cool pastel violet"], ["Sea Glass", "#4fae9d", "Muted blue green"], ["Ink", "#2b2f55", "Almost black navy"]]The shades: name, colour, one line (made up).
FIRSTscript.js0The shade chosen at the start.
BRUSHscript.js0.42How many seconds the colour takes to rise on a nail.
STAGGERscript.js0.09The delay between one nail and the next.
LIFTscript.js9By how many pixels the chosen bottle lifts.
LOOPscript.jstrueLeft alone, a pointer tries the shades one after the other and changes the finish.

Try them in the Playground

When to use it

In the booking flow of a beauty salon, a beautician or a nail bar, or on the product page of a polish shop: letting people try the colour before choosing. With other shapes in place of the nails it works for lipsticks, hair dyes, paints.

On phones

The same card, at most as wide as the screen minus the margins, with nails, bottles and button measured on the height too; the bottles are tapped, hover is not needed.

With reduced motion

No hopping bottles, rising colour or running glints: the nails change colour at once, the chosen bottle stays a little higher and the name changes without rolling.

Pitfalls

  • The bottles are a radiogroup: each has role radio, aria-checked and the shade’s name in aria-label, and the arrows move from one to the next. Colour alone is not enough, the name is always written under the nails.
  • The colour rises by animating the y attribute with attr: GSAP must not round it to the pixel, or on a nail 46 units high it rises in steps.
  • Changing shade halfway through a rise, the previous timeline must be stopped, otherwise at the end it puts the old colour back underneath.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 6.4 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 animations