Overview
Better than react-toastify · 8 types · 6 positions · promise · progress · rich
Status notifications
Trigger each example to see transient feedback without interrupting the current workflow.
Use toasts for brief confirmation or status updates that do not require an immediate decision. Keep critical errors close to the affected field or content.
Anatomy
- Root container and toast wrapper from the Toaster.
- Primary title and optional secondary description text.
- Optional avatars, actions, badges, and progress indicators.
- Dismiss affordance, position stack behavior, and time-based auto-close states.
When to use
- Use for short, time-scoped system feedback after a user action.
- Use for transient process updates like saves, uploads, and background tasks.
- Use when repeated or action-oriented messages are required during interaction.
When not to use
- Do not use toast for critical legal notices requiring confirmation.
- Do not rely on toasts alone for irreversible destructive actions.
- Prefer inline messaging when context is more important than global feedback.
Variants
Variants are driven by helper APIs and styling props such as success, warning, gradient, and custom wrappers.
States
Common states include loading, success, warning, error, info, persistent, dismissed, and promise-based transitions.
Behavior
Toasts queue and stack by default; only the most recent are surfaced when configured with maxToasts.
Accessibility
- Use explicit, concise wording so users can quickly understand context.
- Preserve keyboard accessibility for action buttons and close controls.
- Keep duration and auto-dismiss behavior predictable and consistent.
Content guidelines
- Keep messages short and action-focused.
- Use one primary action per toast whenever possible.
- Match tone to surrounding flows (success, warning, error).
Examples
Types
Click any button to fire a toast — Toaster should be mounted in app layout
Promise toast
Shows loading → resolves to success or error automatically
Shows loading while the promise runs, then switches to success or error
Progress toast
Progress updates in real time and transitions to success when complete
Starts a progress toast that increments every 400 ms
Rich toast — avatar + actions
Collaborative and social notifications with avatars and action buttons
Persistent + dismiss
Use a stable id to update or dismiss a specific toast at any time
Stack — hover to expand
Multiple toasts stack and can be viewed in one interaction
Toasts stack with a collapsed view and expand on hover.
Position
Set position on the Toaster component in your app root
Toast position is controlled by the Toaster component. Place it once in your app root with your preferred position.
Props / API
Toast props
Props
Toaster props
Props