Toast#

Toast is a container for positioning alert notifications at the edges of the page.

A Toast is position: fixed to 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#

TSX
import { Toast, Alert } from '@sigx/daisyui';

Basic Usage#

TSX
Loading preview...

Top Positions#

TSX
Loading preview...

Middle Positions#

TSX
Loading preview...

Bottom Positions#

TSX
Loading preview...

Multiple Alerts#

TSX
Loading preview...

With Custom Class#

TSX
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:

TSX
Loading preview...

Props#

PropTypeDefaultDescription
positionToastPosition"bottom-end"Position of the toast container
classstringAdditional CSS classes

ToastPosition#

"top-start" | "top-center" | "top-end" | "middle-start" | "middle-center" | "middle-end" | "bottom-start" | "bottom-center" | "bottom-end"