Sonner Promise 5 - Promise toast with options

Pro

Promise toast whose success and error handlers return a toast options object.

Shadcn Sonner Promise 5 component

Component data

ID
sonner/sonner-promise-5
Access
pro
Created
Aug 19, 2026
Type
example
Libraries
Radix UI, Base UI, React Aria

Sonner Promise 5 component design & features

This sonner example uses the shadcn Sonner component with toast.promise and handlers that return an options object. Success can include a message and description from the resolved data instead of a single string.

Object-returning promise sonner components fit uploads, imports, and other async work that needs a richer final toast than a one-line status.