An opinionated toast notification component for Svelte applications, ported from Sonner.
svelte-sonner is a toast notification library specifically designed for Svelte applications. It provides a flexible and customizable way to display temporary messages, alerts, and feedback to users with minimal setup, enhancing user experience through a simple API.
Svelte developers who need to implement toast notifications in their applications, particularly those using Tailwind CSS or requiring extensive customization options like different toast types, themes, and programmatic control.
Developers choose svelte-sonner for its seamless integration with Svelte, extensive customization capabilities including Tailwind CSS support, and a feature-rich API that includes multiple toast types, programmatic updates, and advanced functionality like promise handling and custom components.
An opinionated toast component for Svelte. A port of @emilkowalski's sonner.
Supports default, success, info, warning, error, action, promise, and custom components, as detailed in the Types section, enabling versatile user feedback.
Offers unstyled mode and class-based styling for seamless Tailwind CSS usage, explicitly shown in the Tailwind CSS section with examples for per-toast customization.
Allows updating, dismissing, and tracking toasts via API calls and the useSonner hook, enabling dynamic management as demonstrated in the Programmatically remove toast and useSonner sections.
Provides themes, positions, expandability, rich colors, and custom icons through snippets, as evidenced in the Customization section for flexible UI adaptation.
The README does not mention built-in accessibility features like ARIA labels or keyboard navigation, requiring developers to implement them manually, which can be a oversight for inclusive design.
As a Svelte-specific library ported from Sonner, it cannot be used in projects with other frameworks, limiting portability and creating vendor lock-in for Svelte-only ecosystems.
Custom styling, especially with Tailwind, requires understanding multiple class properties and snippets, which can be overwhelming for simple use cases compared to drop-in styled solutions.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.