Installation
Usage
Toast Manager
toastManager.add()
string
Toast title text.
string
Toast description/body text.
string
Toast type. Options:
default, success, info, warning, error, loadingnumber
default:"5000"
Duration in milliseconds before auto-dismiss.
object
Action button configuration:
{ children: ReactNode, onClick: () => void }ToastProvider Props
string
default:"bottom-right"
Toast position on screen.Options:
top-left, top-center, top-right, bottom-left, bottom-center, bottom-rightnumber
default:"5000"
Default duration for all toasts.
number
Maximum number of visible toasts.
Toast Types
- default: Standard toast
- success: Success message with check icon
- info: Information message with info icon
- warning: Warning message with alert icon
- error: Error message with error icon
- loading: Loading state with spinner
Examples
Success Toast
Error Toast
With Action Button
Loading Toast
Custom Duration
Different Positions
Accessibility
- Built on @base-ui/react Toast primitive
- ARIA live region announcements
- Keyboard dismissible (Escape or swipe)
- Focus management
- Swipe to dismiss support
- Screen reader compatible