Interface: ToastContent
Defined in: components/Toast/Toast.tsx:299
The payload each toast carries on the queue.
Properties
actionLabel?
optionalactionLabel?:string
Defined in: components/Toast/Toast.tsx:319
Label for the toast's single action — "Undo", "Retry", "View".
Caller-supplied and caller-localized (ADR-001): this package ships no i18n runtime and will not put untranslated English on a button. Omit it and the toast reports without offering, which is the common case.
Supplying it changes the toast's dismissal contract — an actionable toast
never auto-dismisses. See resolveToastOptions.
description?
optionaldescription?:ReactNode
Defined in: components/Toast/Toast.tsx:303
Optional longer description.
evaluation?
optionalevaluation?:"primary"|"accent"|"positive"|"caution"|"negative"
Defined in: components/Toast/Toast.tsx:308
Authorial valence. Feedback toasts encode meaning through color.
Default
'primary'
onAction?
optionalonAction?: () =>void
Defined in: components/Toast/Toast.tsx:326
Invoked when the action is pressed. Required in practice whenever
actionLabel is set — a labelled button that does nothing is worse than
no button — but kept optional so a caller can render the label while the
handler is still being wired.
Returns
void
shouldCloseOnAction?
optionalshouldCloseOnAction?:boolean
Defined in: components/Toast/Toast.tsx:338
Whether pressing the action also dismisses the toast.
Defaults to true, which is where this diverges from the reference (it
defaults to false and asks callers to opt in). Acting on a report ends
the report: the user has answered, and leaving the toast on screen asks
them to dismiss the same message twice. Pass false for an action whose
result the toast should keep narrating.
Default
true
title
title:
ReactNode
Defined in: components/Toast/Toast.tsx:301
Short heading for the toast.