Toast Notifications
Brief, non-blocking notifications triggered imperatively with the useToast composable, in contextual success, error, warning, and info styles.
Toast Types
Toast Options
Toast API Reference
Toasts are generated dynamically via JavaScript. The configuration object accepts the following fields:
| Property | Description | Default / Type |
|---|---|---|
message | The main text content displayed in the toast notification. | string (required) |
title | An optional bolder heading displayed above the message. | string |
type | Visual variant (success, error, warning, info). | info |
duration | Time in milliseconds before the toast automatically dismisses. | 5000 |
position | Screen placement (e.g., top-right, bottom-left). | top-right |
dismissible | Shows a close button. toast.dismiss(id) removes one toast. | true |
showProgress | Draws the remaining-time bar. | true |
solid | Uses the solid status fill instead of the soft surface. | false |
Mount the container once
useToast() only queues messages. VdToastContainer teleports them to body. These docs mount it in App.vue. Mount it once in your app or the queue stays invisible.
v1.4.1 sanitizes toast title and message HTML with inline styles disabled for framework call sites. Prefer plain text strings for user-provided notification content.