A feather-light, well-tested toast notification component for Svelte and vanilla JavaScript web applications.
svelte-toast is a lightweight toast notification library for displaying temporary messages, alerts, or feedback in web applications. It solves the need for a simple, customizable, and framework-agnostic notification system that works seamlessly with Svelte or vanilla JavaScript.
Frontend developers building Svelte applications or any JavaScript project needing a minimal, elegant toast notification solution.
Developers choose svelte-toast for its tiny footprint, ease of customization via CSS variables, and flexibility to work across frameworks without heavy dependencies.
Simple elegant toast notifications
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Compiled size is only 20kB minified and 8kB gzipped, with minimal lines of code, ensuring low impact on performance as highlighted in the README badges.
Works as a Svelte component or with vanilla JavaScript via CDN or bundler, offering flexibility for diverse projects without framework lock-in.
Uses CSS variables for easy global or per-toast styling, allowing developers to customize colors, fonts, and layouts with standard CSS, as detailed in the theming section.
Supports HTML, Svelte components, or custom actions in toasts, enabling complex UI feedback without limitations, with examples for pushing components.
Allows sending toasts to different container targets within the same app, useful for organizing notifications in complex interfaces, as demonstrated from v0.4.
Theming relies entirely on CSS variables, which may be challenging for developers unfamiliar with CSS or teams using CSS-in-JS solutions, requiring manual setup.
Lacks built-in support for features like sound notifications, toast queuing with priorities, or persistence, common in more comprehensive libraries, focusing only on core toast functionality.
The library has undergone API changes, such as deprecating the pop method filter in v0.9, indicating a history of breaking updates that could affect maintenance and upgrade paths.
As a minimal project, it doesn't have a wide range of plugins, pre-built themes, or community extensions compared to larger notification libraries, limiting out-of-the-box options.