Toast

Transient notification surfaced via the useToast hook

Category: overlay · WCAG 2.2-AA · overlay, notification, feedback

Variants

States

Props

PropTypeDefaultDescription
titlestringTitle text for the component.
descriptionstringSupporting description text.
variant'default' | 'success' | 'warning' | 'destructive'defaultSeverity tone: `default` (neutral), `success`, `warning` or `destructive`. Sets the icon and the accent colour. Unlike Badge/Tag/Notification this is a private union, not `ToneInput` — the canonical `danger`/`neutral` spellings are not accepted here.
durationnumber5000How long (ms) the toast stays visible before auto-dismiss.

Design tokens

When to use

When not to use

How to build an accessible Toast in React →

Examples

Trigger

const { toast } = useToast()
toast({ title: "Saved", variant: "success" })

Related components

← Back to docs