Sonner Interactive 5 - Programmatic dismiss

Pro

Dismiss a sonner toast by id or clear the stack with toast.dismiss.

Shadcn Sonner Interactive 5 component

Component data

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

Sonner Interactive 5 component design & features

This sonner example uses the shadcn Sonner component with toast.dismiss. One control removes a toast by the id returned from toast, and another clears every visible toast.

Programmatic dismiss belongs in flows that show a toast and later remove it from code, such as closing a panel, finishing a wizard, or cancelling an in-progress action.