
The star rating
Ratings, SVG, Hover
The day picker of a habit, alone on white in the premium style of product shots: seven days in pale rounds, and the chosen ones turn to ink. Two chosen days side by side weld together: a liquid neck forms between them and widens on a spring until they become one capsule, while the two lean towards each other and a light runs along the run. Taking out a day in the middle snaps the capsule and the two ends recoil. Above, the line rolls between «3 days a week», «Weekdays» and «Every day»; below, the bar of the longest run.
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>
<!--
"Habit day 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 habit day picker with pills that weld into a run</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/index.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage">
<!-- the day picker of a habit: seven real toggle buttons. Days chosen next to each other weld into one capsule,
with a liquid neck that forms between them; taking out a day in the middle snaps the capsule in two -->
<section class="pick" data-pick aria-labelledby="pick-title">
<header class="pick__head">
<div class="pick__habit">
<svg class="pick__icon" viewBox="0 0 20 20" aria-hidden="true"><path d="M3.5 4.5c2.4-.9 4.6-.6 6.5.9 1.9-1.5 4.1-1.8 6.5-.9v10.6c-2.4-.9-4.6-.6-6.5.9-1.9-1.5-4.1-1.8-6.5-.9Z"/><path d="M10 5.4v10.4"/></svg>
<span id="pick-title" class="pick__title">Read 20 pages</span>
</div>
<span class="pick__count" aria-live="polite"><span class="pick__countin" data-count>3 days a week</span></span>
</header>
<div class="days" data-days role="group" aria-label="Repeat on">
<svg class="days__ink" data-ink aria-hidden="true">
<defs>
<filter id="weld" x="-20%" y="-60%" width="140%" height="220%" color-interpolation-filters="sRGB">
<feGaussianBlur in="SourceGraphic" stdDeviation="4" result="soft" data-blur/>
<feColorMatrix in="soft" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 24 -10" result="weld"/>
<feDropShadow in="weld" dx="0" dy="3" stdDeviation="3" flood-color="#0b0b10" flood-opacity="0.22"/>
</filter>
<filter id="weld-mask" x="-20%" y="-60%" width="140%" height="220%" color-interpolation-filters="sRGB">
<feGaussianBlur in="SourceGraphic" stdDeviation="4" data-blur/>
<feColorMatrix mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 24 -10"/>
</filter>
<linearGradient id="sheen" 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.32"/>
<stop offset="1" stop-color="#fff" stop-opacity="0"/>
</linearGradient>
<linearGradient id="gloss" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#fff" stop-opacity="0.16"/>
<stop offset="0.45" stop-color="#fff" stop-opacity="0"/>
</linearGradient>
<mask id="ink-mask" maskUnits="userSpaceOnUse"><g filter="url(#weld-mask)" fill="#fff" data-mask></g></mask>
</defs>
<g class="days__wells" data-wells></g>
<g filter="url(#weld)" class="days__blobs" data-blobs></g>
<rect class="days__gloss" data-gloss fill="url(#gloss)" mask="url(#ink-mask)"/>
<rect class="days__sheen" data-sheen fill="url(#sheen)" mask="url(#ink-mask)"/>
</svg>
<button class="day" type="button" aria-pressed="false" aria-label="Monday" data-day>M</button>
<button class="day" type="button" aria-pressed="false" aria-label="Tuesday" data-day>T</button>
<button class="day" type="button" aria-pressed="false" aria-label="Wednesday" data-day>W</button>
<button class="day" type="button" aria-pressed="false" aria-label="Thursday" data-day>T</button>
<button class="day" type="button" aria-pressed="false" aria-label="Friday" data-day>F</button>
<button class="day" type="button" aria-pressed="false" aria-label="Saturday" data-day>S</button>
<button class="day" type="button" aria-pressed="false" aria-label="Sunday" data-day>S</button>
</div>
<footer class="pick__foot">
<span class="run">
<span class="run__label" data-runlabel>Longest run</span>
<span class="run__track"><span class="run__fill" data-runfill></span></span>
<span class="run__value"><span class="run__valuein" data-runvalue>1 day</span></span>
</span>
<span class="pick__today"><span class="pick__todaymark"></span>Today, Thu</span>
</footer>
</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>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.
28 values to change
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 “Habit day picker” from Animorio and fit it into my siteThe days are seven buttons with aria-pressed: keyboards, screen readers and forms work by themselves, and the arrow keys move the focus from day to day. The drawing sits in an svg under them that takes no pointer.
For each chosen day there is an ink circle, and between two neighbouring days a rectangle as tall as the circle times a value t from 0 to 1. They all go through one filter: an feGaussianBlur and an feColorMatrix that sharpens the alpha (24, −10). Where two shapes are close the blurred white adds up and becomes solid: that is the liquid neck, which forms by itself as t rises with elastic.out.
When two days weld they lean LEAN pixels towards each other and come back to zero on an elastic; when the capsule snaps the bridge drops with power3.in and the ends left behind jump away and come back. It is a dx offset on the circle’s centre, read on every frame.
A mask repeats the same shapes through the filter without the shadow: through it pass a still gloss on top and a band of light that runs along a run that has just welded. The shadow under the capsule is an feDropShadow inside the same filter.
The line at the top comes from the shape of the week (Weekdays, Weekends, Every day or the number) and rolls up or down as the days grow or shrink; the longest run is counted walking the seven days and stretches the bar on a spring.
| Name | File | Default | What it changes |
|---|---|---|---|
START | script.js | [0, 2, 4] | The days chosen when the page opens (0 is Monday). |
TODAY | script.js | 3 | Which day is today, marked with the short bar. |
WELD_TIME | script.js | 0.75 | The seconds of the neck forming between two days. |
SPRING | script.js | 1 | How springy the capsules are. |
LEAN | script.js | 2.5 | How many pixels the days lean when they weld and recoil when they snap. |
NECK | script.js | 4 | How soft and liquid the neck between two days is. |
--ink | style.css | #16161b | The colour of the capsules. |
--accent | style.css | #2f7d62 | The green of the run and of today. |
In habit, workout, meditation and study apps, in repeating reminders, in the days of a class or a subscription, in the delivery days of a grocery service: wherever you pick days of the week and it matters to see how many are in a row.
The rounds are sized on the screen width between 34 and 46 pixels, so the row fits a 320 phone; on touch the day squashes and is chosen, and the Today label goes below 380 pixels.
No bounces, leaning or running light: the ink and the necks fade in and out, the words change with a fade. The drawn pointer does not show.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.0 KB; the libraries: GSAP 28 KB.
Tested on 14 November 2026
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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.