Toast
Toast is a container for positioning alert notifications at the edges of the page.
A
Toastisposition: fixedto a corner of the viewport. The previews below wrap each example in a bordered box that acts as the positioning context, so the toasts stay inside their example instead of stacking in the page corner — in your app, drop the wrapper and the toast will anchor to the viewport.
Import
import { Toast, Alert } from '@sigx/daisyui';
Basic Usage
Loading preview...
Top Positions
Loading preview...
Middle Positions
Loading preview...
Bottom Positions
Loading preview...
Multiple Alerts
Loading preview...
With Custom Class
Loading preview...
Interactive (Trigger on Click)
Toasts are usually shown in response to an action and dismissed after a delay. Click the button to show one:
Loading preview...
Props
| Prop | Type | Default | Description |
|---|---|---|---|
position | ToastPosition | "bottom-end" | Position of the toast container |
class | string | — | Additional CSS classes |
ToastPosition
"top-start" | "top-center" | "top-end" | "middle-start" | "middle-center" | "middle-end" | "bottom-start" | "bottom-center" | "bottom-end"