Toast
Toast notifications (Sonner), themed and theme-synced.
shadcn/ui · new-york-v4 · synced Aug 29, 2026shadcn/uinew-york-v4 · synced Aug 29, 2026
Installation
import { Toaster, toast } from "@aspyn-io/kit";Setup + firing toasts
Mount Toaster once in your root layout (inside ThemeProvider: it syncs to light/dark automatically), then call toast() from anywhere.
Variants
toast.success / toast.info / toast.warning / toast.error each render with their matching icon.
Loading + promise
toast.promise swaps a loading toast for a success or error message when the promise settles; toast.loading gives you a spinner you dismiss yourself.
Notes
- Inherited from shadcn/ui (Sonner). Promise toasts (toast.promise), dismissal, stacking, and the success/info/warning/error/loading icons come free.
- shadcn's Toaster reads the theme via next-themes; without a next-themes provider it follows the OS (system). To sync it to a manual light/dark toggle, wrap the app in next-themes' ThemeProvider.