Skip to content
animorio
IT
Back to the library

Word of the day

Text, HoverGSAP, CSS onlyMediumCompressed weight: Demo 5.5 KBGSAP 28 KBFreeDownload the zip

A dictionary’s word-of-the-day card: with “Hear it” the word opens into its syllables, each is said in turn with a small hop and a warm colour, and the stressed one takes weight and width on the font’s axes. The arrow brings the next word, with the definition arriving word by word.

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>
<!--
  "Word of the day" 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>Word of the day</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">
    <!-- a dictionary's word of the day: press "Hear it" and the word opens into its syllables,
         each one is said in turn and the stressed one takes the weight; the arrow brings the next word -->
    <section class="wd" data-wd aria-label="Word of the day">
      <header class="wd__head">
        <span class="wd__title">Word of the day</span>
        <span class="wd__kind"><span data-kind>noun</span></span>
      </header>

      <h1 class="wd__word" data-word aria-live="polite"></h1>
      <p class="wd__ipa"><span data-ipa></span></p>
      <p class="wd__def" data-def></p>

      <footer class="wd__foot">
        <button class="wd__hear" type="button" data-hear>
          <span class="wd__bars" aria-hidden="true"><i></i><i></i><i></i><i></i></span>
          <span>Hear it</span>
        </button>
        <button class="wd__next" type="button" data-next aria-label="Next word">
          <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M4 10h11M10.500 5.500 15 10l-4.500 4.500"></path></svg>
        </button>
      </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>

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.

15 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 “Word of the day” 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 paper-coloured ground, a warm white card: at the top “Word of the day” and the label “noun”; then the large word, “petrichor”, its phonetic transcription in grey, the definition on two lines, and at the bottom the dark “Hear it” button with four bars and a round arrow for the next word. On opening the syllables rise one after the other and the definition arrives word by word. Pressing “Hear it” the word opens: space appears between pet, ri and chor with a small bounce, then each syllable in turn lights up orange and hops; the stressed one gets heavier and wider and stays so until the word is finished, while the button’s bars beat in time. At the end the syllables close up and go back to their weight. With a real click the browser also says the word aloud. The arrow sends the syllables out upwards and brings “apricity”, then “susurrus”.

How it works

One box per syllable

The word is a flex row of boxes, one per syllable, and the space between them is the gap, written by a CSS variable that a tween opens and closes. Screen reader users hear the whole word from the aria-label.

Three variables per box

Each syllable has weight, width and heat in three CSS variables: the timeline raises them on its turn and lets go right after; the stressed one reaches STRESS and keeps most of its weight to the end.

The voice, only on a real click

If the click comes from a person and the browser has speech synthesis, the word is also spoken. The demo’s pointer does not trigger it: a preview should not talk by itself.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#c2410cThe colour of the syllable while it is being said.
PACEscript.js0.34How many seconds a syllable lasts.
GAPscript.js9How many pixels the syllables open by while the word is said.
STRESSscript.js860The weight of the stressed syllable (wght axis, 640 to 900).
VOICEscript.jstrueOn a real click the browser also says the word aloud.
HOLDscript.js1.2On its own: how many seconds it waits before the next word.
LOOPscript.jstrueLeft alone, a pointer hears the word and moves on to the next.

Try them in the Playground

When to use it

In a dictionary or language-course app, in the newsletter or blog of someone who writes about words, on a school’s home page; and wherever a name needs teaching how to say: a brand, a dish, a surname.

On phones

The same card: the word and the spacing shrink with the window’s height, the two buttons are 38 pixels tall and the word itself can be tapped to hear it.

With reduced motion

No hops, openings or rises: the stressed syllable takes the colour for a moment, and the next word arrives at once.

Pitfalls

  • Syllable breaks and stress are hand-written for three words: a real dictionary takes them from its data, and the demo’s phonetic transcriptions are indicative.
  • The browser’s speech synthesis changes voice and pronunciation from device to device, and can get rare words wrong: a serious dictionary needs recorded audio.
  • The longest word has to fit the line even with the syllables open and the stressed one widened: with long words lower the size or GAP.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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