Toaster
The<Toaster /> component renders all active toasts. It must be placed in your app to display toast notifications.
Props
All props are optional and allow you to customize the default behavior and appearance of toasts.Default position for all toasts. Can be overridden per toast.Options:
'top-left', 'top-center', 'top-right', 'bottom-left', 'bottom-center', 'bottom-right'Default: 'top-center'Default options to apply to all toasts. Can be overridden per toast.
Spacing in pixels between toasts.Default:
8Custom CSS styles for the toast container element.
CSS class name to apply to the toast container element.
Examples
Custom Position
Custom Styling
Custom Gutter
Container Styling
Complete Configuration
The
<Toaster /> component should only be rendered once in your application. All toast notifications will be displayed through this single instance.