
The elastic button
Buttons, Hover, Text
The field for adding a task in a to-do app, on white: as you type, words like “tomorrow 5pm” or “fri” are tinted under the text and become a pill with the real date, and “#studio” becomes the project pill in its own colour. Press Return and the task drops in at the top of the list while the pills fly to their place in the row; a pill’s x keeps the words as plain text. Ticking a task fills the circle, strikes the row through and lets it go.
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>
<!--
"Task field with date" 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 new task field that recognises the date as you type it</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" data-stage>
<!-- a to-do field that reads the task as you type: a day or a time becomes a date pill,
a #word becomes a project pill, and Return files the task in the list with its pills -->
<section class="card" data-card aria-label="Add a task">
<div class="field" data-field>
<span class="field__plus" aria-hidden="true">
<svg viewBox="0 0 20 20"><path d="M10 5.5v9M5.5 10h9"/></svg>
</span>
<span class="field__box" data-box>
<span class="field__mirror" data-mirror aria-hidden="true"></span>
<input class="field__input" data-input type="text" autocomplete="off" autocapitalize="sentences" spellcheck="false"
aria-label="New task. Write a day, a time or a #project" placeholder="Add a task, like “lunch fri #home”">
</span>
<span class="field__enter" data-enter aria-hidden="true">
<svg viewBox="0 0 20 20"><path d="M15 5.5v4.2a2.3 2.3 0 0 1-2.3 2.3H5.5"/><path d="M8.4 9.1 5.5 12l2.9 2.9"/></svg>
</span>
</div>
<div class="pills" data-pills>
<p class="pills__hint" data-hint>Write a day, a time or a <b>#project</b></p>
<div class="pills__row" data-pillrow aria-live="polite"></div>
</div>
<div class="list__head">
<span>Upcoming</span>
<span class="list__count" data-count><span data-countnum>2 tasks</span></span>
</div>
<ul class="list" data-list></ul>
</section>
<svg class="pointer" data-pointer viewBox="0 0 24 24" aria-hidden="true">
<path d="M5 3.2v15.6l4.3-4.1 2.7 6.1 2.6-1.1-2.7-6h5.9z"/>
</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.
22 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 “Task field with date” from Animorio and fit it into my siteThe real field is an input with transparent text and a blue caret; behind it, in the same place and with the same type, an element redraws the text at every letter, with the recognised words wrapped in a coloured span. The input’s horizontal scroll is copied onto the element behind, so the tints stay under the right letters.
A regular expression looks for today, tonight, tomorrow, next week, full or short day names and an optional time with am or pm; a time on its own means today. Short forms only count when a space follows, so typing money doesn’t make the mon pill flash in and out. The day is worked out from today’s date and 5pm becomes 17:00.
Each pill has its own key: when the key is new, the tint under the text grows with a CSS animation that runs only that once; when only the label changes, the old one leaves upwards and only then the new one comes in. The grey hint leaves before the first pill arrives and returns only when there are none left.
On Return the new row comes in at the top with its pills invisible. For each pill in the field we measure where it is and where it must land, put a position fixed copy in its place and move it with x on power3 and y on back, so it makes a small arc; once it lands the copy goes and the row’s real pill appears.
The filled circle grows with scale and svgOrigin at its centre, the tick draws with stroke-dashoffset, a line as wide as the text stretches with scaleX and the row closes by taking height and opacity to zero. The task count changes by leaving upwards and coming back from below.
| Name | File | Default | What it changes |
|---|---|---|---|
TYPE_SPEED | script.js | 14 | How many letters per second the autopilot types. |
POP | script.js | 1.7 | How much the pills bounce when they appear: 0 none, 3 a lot. |
ACCENT | script.js | #3d5afe | The colour of the recognised date, the active field and the tick. |
TASK_ONE | script.js | Call framer tomorrow 5pm #studio | The first task the autopilot types. |
TASK_TWO | script.js | Pick up prints mon #errands | The second task the autopilot types. |
MAX_ROWS | script.js | 4 | How many tasks the list holds before the oldest one leaves. |
In to-do apps, calendars, reminders and any field where people type in a hurry: instead of opening a date picker you write the way you talk, and the field shows straight away what it understood, with a way to say no.
The card is at most as wide as the screen minus the margins and a little over 300 pixels tall, so it fits whole in the frame; long text scrolls inside the field and the tints follow it. On a phone you tap the pills’ x and the tasks’ circles, which are big enough for a finger.
No movement: the pills, rows and count appear and disappear with a fade, the pills don’t fly but appear already in the row, the tints under the text arrive without growing and the drawn pointer is hidden.
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.
Tested on 29 October 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.