rtm

Types

TypeScript definitions for react-toast-msg.

Ask ChatGPT

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

ToastType

typescript
1export 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.

ToastContainerProps

Props accepted by the ToastContainer component.

PropsTypeDefaultDescription
autoClosenumber3000Global default duration for auto-closing toasts.
closeButtonbooleanfalseWhether to show a close button on all toasts by default.

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 February 17, 2026