Toaster
Preview
Section titled “Preview”Installation
Section titled “Installation”npx skeci-ui add toaster- Add the
Toastercomponent to your root layout.
import { Toaster } from '@/components/ui/toaster';
export default function RootLayout({ children }) { return ( <html> <body> <main>{children}</main> <Toaster /> </body> </html> );}- Trigger a toast from anywhere in your app.
import { toast } from '@/components/ui/toaster';
toast("Hello World");Variants
Section titled “Variants”The Toaster component accepts all props from sonner.