Shadcn.io is not affiliated with official shadcn/ui
Basic Promise Toast
A Sonner promise toast that automatically transitions from loading to success or error based on promise resolution
Ever built async operations and manually juggled loading, success, and error toasts? This React promise toast handles all three states automatically. Built with Sonner and shadcn/ui, toast.promise watches your promise and updates the toast from loading to success or error based on resolution—perfect for API calls, form submissions, file uploads, data fetching, async operations, or any promise-based action where you want automatic loading feedback without manual state tracking and toast management.
Basic Promise Toast preview
Installation
Related Components
Promise Toast with Data
Promise toast using resolved data in success message
Promise Toast with Error
Promise toast with custom error message formatting
Loading Toast
Standalone loading toast without promise
Toast with Action Button
Toast with action button for interactions
Success Toast
Success notification toast
Error Toast
Error notification toast
FAQ
Was this page helpful?
Sign in to leave feedback.