# Building a Toast Component

Essay by Emil Kowalski (https://emilkowal.ski)

My experience building Sonner, a toast library.

Topics: Components, Motion
Source: https://emilkowal.ski/ui/building-a-toast-component

## For agents

Nothing to install. This is a reference: cite it, or fetch the source when
the reasoning matters.

Read it at: https://emilkowal.ski/ui/building-a-toast-component

The full text is not reproduced here. It belongs to its author. What is
above is the author's own summary and the topics it covers.

Skills in this library that act on the same ground:

- emil-design-eng (https://www.stackskills.dev/md/emil-design-eng): The design-engineering house style behind Sonner and Vaul.
- animate (https://www.stackskills.dev/md/animate): Builds an animation from scratch, decisions in the order that matters.
- review-animations (https://www.stackskills.dev/md/review-animations): Reviews your motion strictly, against Emil's rules.
- improve-animations (https://www.stackskills.dev/md/improve-animations): Audits every animation in a codebase and hands back prioritised plans.
- find-animation-opportunities (https://www.stackskills.dev/md/find-animation-opportunities): Finds where motion would genuinely help, and says what not to animate.

## The short version

Sonner now passes forty million npm downloads a week and is used by Cursor, X and OpenAI, in a category that was already crowded when Emil started. He traces why it won, beginning with the name, which came from the French verb for ringing rather than from react-toast. The stacking animation is what made people fall for it on sight, and it had been done in products before without ever being open sourced. The build has a real lesson in it too. CSS keyframes made quickly added toasts jump into position, so he moved to transitions, which can be interrupted and retargeted mid-flight.

## Verification

- Source link: Resolved (HTTP 200) (pass)
- Reading copy: Plain markdown for agents at /md/building-a-toast-component (pass)
- Attribution: Credited to Emil Kowalski (pass)

Full page: https://www.stackskills.dev/library/building-a-toast-component
