Toast
A succinct message that is displayed temporarily.
Interactive
Requires:
veritheme.js
JS init: automatic
Trigger Toasts
Click buttons to see live toast notifications.
html
<button class="vt-btn vt-btn-bordered" onclick="veritheme.showToast('default')">
Default
</button>
<button class="vt-btn vt-btn-bordered" onclick="veritheme.showToast('success')">
Success
</button>
<button class="vt-btn vt-btn-danger" onclick="veritheme.showToast('error')">
Error
</button>
<button class="vt-btn vt-btn-primary" onclick="veritheme.showToast('action')">
With Action
</button>
Static Previews
All toast variants inline.
html
Scheduled: Catch up
Friday, February 14, 2026 at 5:57 PM
Success
Your changes have been saved.
Error
Something went wrong. Please try again.
<div class="vt-toast">
<div class="vt-toast-content"><p class="vt-toast-title">Scheduled: Catch up</p><p class="vt-toast-description">Friday, February 14, 2026 at 5:57 PM</p></div>
<button class="vt-btn vt-btn-bordered vt-btn-sm"><span>Undo</span></button>
</div>
<div class="vt-toast vt-toast-success">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-toast-icon" aria-hidden="true">
<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M8 12.5L10 14.5L15.5 9.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
<div class="vt-toast-content"><p class="vt-toast-title">Success</p><p class="vt-toast-description">Your changes have been saved.</p></div>
</div>
<div class="vt-toast vt-toast-danger">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-toast-icon" aria-hidden="true">
<circle cx="12" cy="12" r="10" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle><path d="M12 8V12" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M12.125 15.75H12M12.25 15.75C12.25 15.8881 12.1381 16 12 16C11.8619 16 11.75 15.8881 11.75 15.75C11.75 15.6119 11.8619 15.5 12 15.5C12.1381 15.5 12.25 15.6119 12.25 15.75Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
</svg>
<div class="vt-toast-content"><p class="vt-toast-title">Error</p><p class="vt-toast-description">Something went wrong. Please try again.</p></div>
<button class="vt-btn vt-btn-bordered vt-btn-sm"><span>Retry</span></button>
</div>
Guidelines
Saved
Your changes have been saved.
Terms updated
Our policy has changed. Please review the full document, adjust your preferences, and re-accept before continuing.
API Reference
| Class | Type | Description |
|---|---|---|
vt-toast |
Component | Toast card — a row of icon, text and buttons; surface, border, radius and a large shadow |
vt-toast-success/vt-toast-danger |
Variant | Intent: colors the icon (and the border, for danger) |
vt-toast-icon |
Part | Intent icon, 20px |
vt-toast-content |
Part | Title and description stacked 2px apart; takes the rest of the row |
vt-toast-title |
Part | Title — Label/MD |
vt-toast-description |
Part | Description — Caption, muted |
vt-btnvt-btn-borderedvt-btn-sm |
Part | Optional action (Undo, Retry) |
vt-btnvt-btn-ghostvt-btn-iconvt-btn-sm |
Part | Dismiss (aria-label="Close") |
vt-fixedvt-bottom-4vt-right-4vt-z-50 |
Layout | Fixed position container for live toasts |
Accessibility
| Feature | Details |
|---|---|
| Role | Use role="status" for info toasts, role="alert" for errors |
| Live region | Toast container uses aria-live="polite" for non-urgent messages |
| Dismiss | Close button should have aria-label="Dismiss notification" |
| Focus | Toasts should not steal focus from the current task |
| Auto-dismiss | Provide enough time to read (5s minimum), pause on hover |