A toast component is used to show a notification

CSS Parts
base — The base wrapper of the toast.

Determines the duration in ms in which the component will be visible.

displayTime: number

Determines whether the component should close after the displayTime is over.

keepOpen: boolean

Whether the component is in shown state.

open: boolean

Sets the position of the component in the viewport.

position: AbsolutePosition

Closes the component.

hide(): Promise<boolean>

Returns Promise<boolean>

Opens the component.

show(): Promise<boolean>

Returns Promise<boolean>

Toggles the open state of the component.

toggle(): Promise<boolean>

Returns Promise<boolean>