Launch sale — 60% off Pro
Contact
SonnerPromise

Not affiliated with official shadcn/ui. Visit ui.shadcn.com for official docs.

React Sonner - Basic Promise Toast

A Sonner promise toast that automatically transitions from loading to success or error based on promise resolution

Looking to implement shadcn/ui patterns?

Join our Discord community for help from other developers.


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.

Pattern created by @haydenbleasel

Installation

Questions you might have