rtm

Types

TypeScript definitions for react-toast-msg.


react-toast-msg is built with TypeScript and provides first-class type definitions.

ToastType

typescript
export type ToastType = 'success' | 'error' | 'warning' | 'default';

ToastOptions

Used when triggering a toast (internally or via future API extensions).

PropsTypeDefaultDescription
typeToastType'default'The style of the toast.
durationnumber3000Time in ms before auto-close.
closeButtonbooleanfalseWhether to show a close button on all toasts by default.
autoClosebooleannumber-
pauseOnHoverbooleantruePause the auto-close timer while the toast is hovered.

ToastContainerProps

Props accepted by the ToastContainer component.

PropsTypeDefaultDescription
autoClosenumberboolean3000
closeButtonbooleanfalseWhether to show a close button on all toasts by default.
pauseOnHoverbooleantruePause the auto-close timer while any hovered toast remains visible.

ShowToastFn

The signature for the toast function.

PropsTypeDefaultDescription
messagestring-The message to display.
typeToastType'default'The style of the toast.
durationnumber3000Time in ms before auto-close.

How is this guide?

Last updated on April 22, 2026