Feedback
Toast
A notification that appears at the edge of the viewport and dismisses itself. Built on Sonner. The <Toaster /> component has to be in your root layout or nothing renders.
Trigger Toasts
Import
import {
Toaster,
toast,
} from "@mikenotthepope/substrateui"API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
toast(message) | function | — | Shows a default toast notification with the given message string. |
toast.success(message) | function | — | Shows a success toast with a green check icon. |
toast.error(message) | function | — | Shows an error toast with a red icon. |
toast.warning(message) | function | — | Shows a warning toast with a yellow icon. |
toast.info(message) | function | — | Shows an informational toast with a blue info icon. |
description | string | — | Optional description passed as second argument options: toast('Title', { description: '...' }). |