
API
TypeScript
Returns
APromise that resolves to an object containing:
() => Promise<void>
By calling
hideToast() you can imperatively hide the toast.Options
string
required
The title of the toast.
string
required
The text of the toast.
{ label: string, onClick: () => void }
An optional action button that can execute code if and when the user triggers it.
number
How long to keep the toast open.Defaults to
4_000 (four seconds)boolean
Whether or not to allow the user to dismiss the toast.Defaults to
true.