Skip to content
animorio
IT
Back to the library

Skill pills tray

Physics, HoverGSAP, CSS onlyAdvancedCompressed weight: Demo 13 KBGSAP 28 KBFreeDownload the zip

The profile card of a made-up product designer on a portfolio platform: the name with a verified seal, the role, the availability, three numbers and the buttons. Under it, a sunken tray holds her skills as pills, moved by hand-written physics: rectangular bodies with rounded corners, gravity, bounce, friction and collisions. Move the pointer sideways and the tray leans, gravity leans with it and the pills slide to the low side; a pill can be grabbed, swung from where you hold it and thrown. Premium minimal style.

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>
<!--
  "Skill pills tray" 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 designer's profile with skills in a tray that tilts</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/geist-mono@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage" data-stage>
    <!-- the profile card of a product designer on a portfolio platform. Under it, a tray holds her skills: pills that
         fall in with hand-written physics (rounded bodies, gravity, bounce, friction, collisions). Move the pointer
         sideways and the tray leans a few degrees, gravity leans with it and the pills slide; grab one and throw it -->
    <section class="card" data-card aria-label="Noa Asante, product designer">
      <span class="card__sheen" aria-hidden="true"></span>

      <header class="card__head" data-line>
        <span class="avatar" aria-hidden="true">
          <span class="avatar__face">NA</span>
        </span>
        <span class="card__who">
          <span class="card__name-row">
            <h1 class="card__name">Noa Asante</h1>
            <svg class="card__badge" viewBox="0 0 16 16" aria-label="Verified"><path class="card__badge-seal" d="M8 1.2l1.7 1.3 2.1-.2.7 2 1.8 1.1-.5 2.1.9 1.9-1.6 1.4-.2 2.1-2.1.4L9.6 15 8 13.8 6.4 15l-1.2-1.7-2.1-.4-.2-2.1L1.3 9.4l.9-1.9-.5-2.1 1.8-1.1.7-2 2.1.2Z"/><path class="card__badge-tick" d="M5.4 8.2l1.8 1.8 3.4-3.6"/></svg>
          </span>
          <span class="card__role">Product designer<span class="card__at"> at Fieldnote</span></span>
        </span>
        <span class="chip" data-chip>
          <svg viewBox="0 0 16 16" aria-hidden="true"><rect x="2.6" y="3.4" width="10.8" height="10" rx="2.4"/><path d="M2.6 6.6h10.8M5.6 2v2.6M10.4 2v2.6"/></svg>
          <span>Free from Dec 2</span>
          <span class="chip__shine" aria-hidden="true"></span>
        </span>
      </header>

      <ul class="facts" data-line>
        <li><b>8</b> yrs</li>
        <li><b>64</b> shipped</li>
        <li><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 1.9l1.8 3.8 4.1.5-3 2.9.8 4.1L8 11.2l-3.7 2 .8-4.1-3-2.9 4.1-.5Z"/></svg><b>4.9</b> rating</li>
      </ul>

      <div class="actions" data-line>
        <button class="btn btn--main" type="button" data-hire>
          <span class="btn__fill" aria-hidden="true"></span>
          <span class="btn__face">
            <span class="btn__words">Hire Noa</span>
            <svg class="btn__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M3.5 8h8.6M8.6 4.4 12.2 8l-3.6 3.6"/></svg>
          </span>
        </button>
        <button class="btn btn--ghost" type="button">
          <span class="btn__face">
            <svg class="btn__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M2.8 4.4c0-.9.7-1.6 1.6-1.6h7.2c.9 0 1.6.7 1.6 1.6v5c0 .9-.7 1.6-1.6 1.6H7.2L4.4 13.2V11c-.9 0-1.6-.7-1.6-1.6Z"/></svg>
            <span>Message</span>
          </span>
        </button>
      </div>

      <div class="skills-head" data-line>
        <span>Skills</span>
        <span class="level" aria-hidden="true">
          <span class="level__ruler"><span class="level__ticks" data-ticks></span><span class="level__needle" data-needle></span></span>
          <span class="level__deg" data-deg>0.0°</span>
        </span>
      </div>

      <!-- the well keeps its place in the card; the tray inside leans, and the pills are its children -->
      <div class="well" data-well data-line>
        <div class="tray" data-tray role="list" aria-label="Skills"></div>
      </div>
      <p class="hint" data-line>Lean the pointer to pour, grab a skill to throw it</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.

41 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 “Skill pills tray” 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 white page with a barely visible grain a light paper card rises and settles, its lines arriving one after another. At the top the avatar with the initials NA in a violet ring that springs in, the name Noa Asante with the violet verified seal that turns open, «Product designer at Fieldnote» and on the right the «Free from Dec 2» pill with a drawn calendar, crossed once by a sheen. Below, three numbers (8 years, 64 shipped, a 4.9 rating with a drawn star), the dark «Hire Noa» button with a violet light that rises on hover and an arrow that slides, and «Message». Then the «Skills» heading with a small level: a row of ticks, the violet needle and the degrees rolling. Into the sunken tray, with fine lines on its floor, the skills fall from above, one every 0.14 seconds: Product design in violet, Motion and Design systems in black, the others in white glass. They bounce, knock into each other and pile up; a hard landing squashes a pill and it springs back, and the faster it flies the higher and wider its shadow. Move the pointer toward one side of the card and the tray leans (with a small overshoot), the level shows the degrees and the pills all slide to the low side; if one is left upside down, its word turns over to be read. A grabbed pill swells, takes a violet outline and hangs from the point you hold, swinging; let go while moving it flies, bounces off the walls and pushes the others. Left alone, a drawn pointer leans the tray left and right, takes the highest pill and throws it to the upper left; at the end the right wall opens, the tray leans 17 degrees and pours all the skills out, then levels again and the pills fall back in from above.

How it works

The pills are capsules

Every pill is a real HTML element, measured with offsetWidth; for the physics it is a rectangle with its corners rounded by half its height, that is a capsule: a segment (width - height) long and a radius. Mass follows the area, the rectangle's inertia is multiplied by STEADINESS, so the pills turn little and stay readable.

Capsules colliding

Two capsules touch when the distance between their segments is less than the sum of the radii. Both ends and the middle of each are tried against the other's segment and up to two contacts far from each other are kept: with two points a pill resting on another does not rock. The walls are lines: the floor, the sides and a high hidden ceiling.

Sequential impulses

At 120 steps a second: gravity on the velocities, then ten rounds over the contacts with the accumulated normal impulse (never negative) and Coulomb friction up to FRICTION times the normal, the bounce decided once from the arrival speed, then the positions, and two passes that push apart whatever still overlaps.

Gravity that leans

The pointer, from one edge of the card to the other, takes the lean from -TILT to +TILT degrees with a spring. In the tray's frame gravity becomes (sin θ, cos θ) times its strength. The tray shows only part of it (LOOK, at most LOOK_MAX degrees) so it never covers the words; friction is low on purpose, since a pill slides only when the tangent of the lean beats the friction.

The hand

The touched point is looked up in the physics, in the tray's rotated frame, so it works with a mouse, a finger and the drawn pointer. The grabbed pill is tied to the pointer by a soft point joint (a 2 by 2 matrix with mass and inertia): it hangs where it was taken and swings; let go, it keeps its velocity and flies.

The details and the loop

A springy squash on hard landings, a shadow that rises with the speed, the word that turns over when the pill is upside down, the level's needle and degrees. A GSAP timeline brings a drawn pointer that leans the tray, throws the highest pill and at the end opens the right wall and pours everything out; a real hand stops it, and it comes back after IDLE seconds.

Values to change

NameFileDefaultWhat it changes
SKILLSscript.jsProduct design, Motion, …The pills, separated by commas: the first one wears the accent.
GRAVITYscript.js1How hard the pills fall.
BOUNCEscript.js0.28How much they bounce.
FRICTIONscript.js0.16How much they grip each other: low, so a small lean is enough to slide them.
TILTscript.js9Degrees gravity leans with the pointer at the edge of the card.
POURscript.js17Degrees of the lean that pours the pills out at the end of the loop.
DROP_GAPscript.js0.14Seconds between one pill and the next as they fall in.
LOOPscript.jstrueThe drawn pointer plays again and again.

Try them in the Playground

When to use it

For a person's card in a portfolio, a freelance site or a hiring platform: skills, tools, interests or services that become something to touch. It also works for a product's tags, the filters of a search or the ingredients of a dish, when you want a moment of play without losing the page's seriousness.

On phones

The same animation with adapted sizes: the tray is measured on the height too, the pills take a height and a type size in proportion to the tray, and everything is recomputed on resize. A finger grabs and throws a pill (touch-action: none on the tray) and a finger moved sideways leans the tray like the mouse; on a narrow card «at Fieldnote» makes room for the availability.

With reduced motion

The pills are already resting in the tray, worked out in an instant before they show, and fade in with the card. The tray does not lean, there is no pointer on its own and no throwing.

Pitfalls

  • With Coulomb friction a pill slides only when the tangent of the lean beats the coefficient: at 0.4 it would take 22 degrees. That is why FRICTION is low, and the floor grips even less (FLOOR_GRIP).
  • A tray leaning 9 degrees covers the heading and the hint: gravity leans all the way, the tray shows a little over half of it and never more than LOOK_MAX.
  • A single contact between two parallel pills makes them rock forever: two are needed, far from each other.
  • A capsule turned half a turn has the same shape but its word is upside down: the word turns over by itself, with a margin (it turns past 103 degrees and back under 77) so a pill standing on end does not flicker.
  • The tray rotates: the touched point has to be taken into its frame, rotating back around the centre of the container that does not rotate.
  • The grabbed pill moves to the end of the tray in the DOM, so it passes over the others.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, Geist Mono (font variabile) 5.3.0.

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

Testing

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