Sonner Interactive 8 - Toast lifecycle callbacks

Pro

Sonner toast with onDismiss and onAutoClose callbacks after the toast leaves.

Shadcn Sonner Interactive 8 component

Component Data

  • ID:sonner/sonner-interactive-8
  • Access:pro
  • Created:Aug 19, 2026
  • Type:example

Sonner Interactive 8 component design & features

This sonner example uses the shadcn Sonner component with onDismiss and onAutoClose. One callback runs when the user closes or swipes the toast, and the other runs when the duration expires.

Lifecycle callbacks belong in analytics, follow-up toasts, or cleanup after a notification leaves the screen.