Success
.toast-success.
Saved
Transient stack feedback — success, error, warn, and info tones.
Live
Saved
Failed
<div class="toast-stack toast-stack--top-end" aria-live="polite">
<div class="toast toast-success" role="status">
<span class="toast-icon" aria-hidden="true"></span>
<div class="toast-body">
<p class="toast-title">Saved</p>
<p class="toast-message">Profile updated.</p>
</div>
<button type="button" class="toast-close" aria-label="Dismiss">…</button>
</div>
</div>
import { ToastProvider, useToast, Toast, ToastStack } from 'caustica-design/core'
import 'caustica-design/css'
<ToastProvider dismissLabel="Dismiss" placement="top-end">
<App />
</ToastProvider>
// inside App:
const { push } = useToast()
push({ tone: 'success', title: 'Saved', message: 'Profile updated.' })
// or static:
<ToastStack placement="bottom-start">
<Toast tone="info" title="Tip" message="Add an invite." dismissLabel="Dismiss" onDismiss={…} />
</ToastStack>
.toast-success.
Saved
.toast-error.
Failed
.toast-warn and .toast-info.
Needs review
Tip
Stack corner via .toast-stack--top-end,
--top-start, --bottom-start,
--bottom-end (default). Uses logical insets + safe-area.
React: placement="top-end" on ToastProvider /
ToastStack.
aria-live="polite"; each toast has role="status".dismissLabel).| Class | Description |
|---|---|
.toast-stack |
Fixed stack container (default: bottom + inline-end). |
.toast-stack--bottom-end|bottom-start|top-end|top-start |
Stack corner placement (logical + safe-area). |
.toast / .toast-success|error|warn|info |
Toast + tone. |
.toast-icon / .toast-body / .toast-title / .toast-message |
Content parts. |
.toast-close / .toast-close-icon |
Dismiss control. |
From src/core/Toast.tsx — ToastProvider + useToast, or stateless Toast.
| Prop | Type | Default | Description |
|---|---|---|---|
dismissLabel |
string |
— | Provider / Toast dismiss aria-label (required). |
placement |
ToastPlacement |
'bottom-end' |
Provider / ToastStack corner: bottom-end | bottom-start | top-end | top-start. |
defaultDurationMs |
number |
4200 |
Provider auto-dismiss default. |
tone |
ToastTone |
'info' |
success | error | warn | info. |
title / message |
string |
— | Title required; message optional. |
push / dismiss |
fns |
— | useToast() API. |