This library is still in development and is available only for internal usage at VTEX.
Skip to main content

Toast

Version: 0.132.0

Toast

The toast is used to show alerts on top of an overlay. The toast will close itself when the dismiss button is clicked, or after a timeout. The toast component is used to give feedback to users after an action has taken place.

Examples

Make sure to call the useToast hook on component level below the <ToastProvider>. This is necessary in order for the Toast to work.

Tone of voice

The toast's tone of voice is either info (default), critical, warning, or positive, and is adjustable using the tone prop.

ReferenceError: Box is not defined

Dismissible

Display a button to allow dismissing the toast when clicked.

Action

Display a button allowing the toast to have an action.

Action + Dismissible