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'defaultSelects the visual style variant.
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