Shadcn UI Toaster Deprecated? Here's What to Use Instead (2025 Guide)


Shadcn UI is one of the most loved UI component libraries for building elegant, accessible, and customizable components in React. But if you’ve recently updated or started a new project, you might have noticed something missing — the Toaster component is deprecated.
So what happened? Why is it deprecated? And what should you use now?
Let’s break it down and explore the best practices for handling notifications in your Shadcn UI-based projects in 2025.
❓What Was the Shadcn UI Toaster?
The Toaster
component in Shadcn UI was a wrapper around sonner, a sleek notification/toast library. It allowed you to display quick feedback (like success, error, or loading states) using toast notifications.
It looked like this:
tsxCopyEditimport { Toaster } from "@/components/ui/sonner"
<Toaster />
And you could trigger a toast like:
tsxCopyEditimport { toast } from "sonner"
toast("File uploaded successfully!")
⚠️ Why Was It Deprecated?
The main reason: Shadcn UI no longer includes opinionated wrappers around third-party libraries. The idea is to give developers more flexibility and avoid tight coupling with external packages.
So rather than maintaining a custom <Toaster />
component, you’re encouraged to install and use the notification system you prefer directly (like sonner
, react-hot-toast
, or radix-toast
).
✅ What to Use Instead?
Option 1: Use sonner
Directly (Recommended)
Since Shadcn UI used sonner
under the hood, you can still use it on your own:
npm install sonner
Then in your layout or root component:
import { Toaster } from "sonner"
<Toaster richColors position="top-right" />
Trigger toasts like:
tsxCopyEditimport { toast } from "sonner"
toast.success("PDF uploaded successfully!")
toast.error("Something went wrong.")
✅ Bonus:
sonner
is still one of the best toast libraries — smooth, customizable, and zero config.
Option 2: Other Libraries You Can Try
react-hot-toast
– Lightweight and beautiful toastsreact-toastify
– Very popular and feature-richCustom-built with
@radix-ui/react-toast
– If you want full control
Sonner official documentation: https://sonner.emilkowal.ski/
🚀 Conclusion
While Shadcn UI no longer includes its own <Toaster />
, that doesn’t mean you’re left without a solution. In fact, it gives you more freedom to use the toast/notification system that works best for your app.
sonner
is still a solid pick, and using it directly gives you full control, better updates, and the flexibility to place it wherever you like.
So go ahead, install sonner
, and keep those sleek, beautiful toasts coming in your UI. 🥂
Subscribe to my newsletter
Read articles from Pranav Singh directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
