Courier in app toast component Props

React Props to define in app toast behaviors like time to auto close, default icon, progress bar, position and animation.

Rodrigo Rojas avatar
Written by Rodrigo Rojas
Updated over a week ago
interface ToastProps {
// Number in ms for Toast to auto close
// Set as `false` to disable auto close

autoClose?: false | number;

// Default icon if no icon is present in message
defaultIcon?: string | false;

// Hide the progress bar
hideProgressBar?: boolean;
onClick?: MouseEventHandler<Element>;

// Toast positioning when triggered
position?: "top-left" | "top-right" | "top-center" | "bottom-left" | "bottom-right" | "bottom-center";
role?: "alert" | "status";
theme?: Theme;

// Animation when the Toast is displayed
transition?: "bounce" | "slide" | "zoom";
}

Did this answer your question?