Skip to content

Toast Notifications

Notifications with queuing and optional deduplication

  1. Uses a single source of truth (using a Ref Map) to track all active timers. This allows for global cleanup and precise control over each toast’s lifecycle.
  2. Only render the max number of toasts; any extras are held in a background queue and “popped” into view only as space opens up.
  3. If an identical message is triggered within a 3-second window, the system resets the existing timer instead of spawning a new toast if deduplication is enabled.
  4. The logic accounts for the EXIT_ANIMATION_DURATION, ensuring the component stays in the DOM just long enough for a smooth Framer Motion fade-out.
  5. Honors prefers-reduced-motion

Toast Notifications

View Source

Success, error, and info notifications with deduplication and queueing

These notifications will automatically disappear after 3 seconds, or you can close them manually. Maximum 3 toasts visible at once.