Skip to content

(Case study) Open-source animation library

Tempo

A 3 kB spring animation library for the web with zero dependencies.

Client
Open source
Role
Author and maintainer
Year
2024
Stack
  • TypeScript
  • Web Animations API
  • Vitest
  • Rollup
Looping trails of light in soft pink, red and teal spiralling through the frame

Overview

Tempo started as a weekend experiment: could spring physics feel as good on the web as in a native app, without shipping a large animation library? It grew into the motion layer behind several of my client projects.

The challenge

Most animation libraries are either tiny and stiff or expressive and heavy. I wanted springs that respond to interruption, respect reduced motion settings and still fit in a few kilobytes.

Approach

Tempo solves the spring equation ahead of time and hands the resulting curve to the Web Animations API, so animations run off the main thread wherever the browser allows it.

  • Interruptible by design: a new target picks up the current velocity.
  • Reduced motion aware out of the box.
  • A typed API small enough to learn in an afternoon.

Outcome

Tempo has 2,100 stars on GitHub, around 40,000 weekly downloads and contributors on four continents. Maintaining it keeps my fundamentals sharp.

(Next project) Patient app

Halcyon Health

Quiet room with linen cushions and sheer curtains glowing in morning light
Read the case study

Available for new projects from February 2027

Have a product that deserves more care?