Components › Feedback
Toast
Brief, non-blocking messages. Mount Toaster once and call toast() from anywhere.
Installation
npx plankui@latest add toastUsage
import { Toast } from "@/components/ui/toast";
toast("Saved")
toast.success("Deployed", "acme-web is live.")
toast({ title: "Archived", action: { label: "Undo", onClick } })API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | required | Main line. |
| description | string | Second line. | |
| tone | "default" | "success" | "danger" | "default" | Icon and colour. |
| action | { label: string; onClick: () => void } | One inline action. | |
| duration | number | 4000 | Milliseconds before it leaves. |