Seintje
Library ยท In Progress
Seintje, Dutch for "a little heads-up", is a toast library written in plain TypeScript and DOM. A compact pill stretches into a full card when there is more to say, and small adapters bring it to Vue 3 and Svelte 5.
Overview
Framework-agnostic toast notifications, with thin adapters for Vue and Svelte.
Challenge
The nicest toast libraries are tied to React. Vue, Svelte and plain JavaScript projects either get a less polished option or need a different library for every framework.
Approach
I wrote the core in plain TypeScript against the DOM, so it works without any framework, and kept the Vue and Svelte packages as thin adapters on top of it. All animation goes through motion's animate() and the icons come from Lucide. The library is inspired by Sileo, but it is an independent implementation.
Outcome
One toast library with the same look, motion and accessibility in vanilla JavaScript, Vue and Svelte.
Highlights
- A compact pill that stretches into a full-width card for descriptions, with actions next to or under the title
- Springs through motion's framework-agnostic animate() that keep their momentum when interrupted
- seintje.promise() for loading, success and error flows with in-place content swaps
- Dismiss with a swipe, the close button or Escape, and focus the stack with Alt+T
- Screen reader announcements through live regions, and timers that pause on hover, focus and hidden tabs
- Light, dark and system themes, CSS variables and per-part classes, and it respects prefers-reduced-motion
- Monorepo with the core, Vue and Svelte packages, released to npm through release-please and trusted publishing