T

ToastOptions

Options accepted when showing a toast.

type ToastOptions = { … }

Members

Buttons in a row under the content.

content?string

The body text under the title.

duration?number

Milliseconds before the toast closes itself; 0 keeps it until dismissed. Omitted, the user's toast duration setting.

icon?string | IconInput | ImageSourcePropType

An asset name, asset id, image source, element such as <Star />, or icon component such as Star; a name with no matching asset draws no image.

id?string

Identifies the toast; showing another toast with the same id replaces it. Omitted, a random id.

onTimeout?() => void

Declared for callers, but the client does not call it yet.

Tints an image icon with the theme's icon colour. Defaults to true; set false for a coloured image. An element or component draws its own colour.

title?string | React.ComponentType

The bold first line, or a component rendered in its place.