React Native Toast Message is a lightweight (~40 kB) and highly customizable animated toast message component designed for React Native applications. It provides an imperative API for easily displaying various types of notifications, including success, error, and info toasts. The current stable version is 2.3.3, with a consistent release cadence focusing on bug fixes, performance improvements, and compatibility updates, as seen with recent fixes for React 19. Key differentiators include its built-in keyboard-aware logic, flexible configuration options, and the ability to define custom toast layouts. The library offers comprehensive documentation for advanced scenarios like integrating toasts within Modals or navigation libraries, which are common pain points in React Native development. It ships with full TypeScript support, ensuring type safety and improved developer experience.
npm install react-native-toast-messageVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates rendering the `Toast` component at the root of your application and using the imperative `Toast.show()` method to display success and error messages.
Review the official v2.0.0 changelog and migration guide on the project's GitHub repository. Adjust component imports, prop names, and API calls accordingly.
Update to version `2.3.2` or higher to resolve the issue where toasts would get stuck when panned. If unable to update, consider disabling swipeable gestures with `swipeable: false`.
Upgrade to version `2.3.0` or newer, which includes a fix for toast positioning issues on iOS when the keyboard is active. Ensure your `Toast` component is rendered at a high enough level in the component tree.
To disable swipeable dismissal, pass the `swipeable: false` option to `Toast.show()` or within your custom toast configuration. For example: `Toast.show({ ..., swipeable: false })`.Ensure you are using `react-native-toast-message` version `2.3.3` or higher for full compatibility with React 19. If you encounter type errors related to `BaseToast`, `SuccessToast`, `InfoToast`, or `ErrorToast` return types, updating the package will resolve them.
Ensure you are using `import Toast from 'react-native-toast-message';` and that the `<Toast />` component is rendered once at the top level of your React Native application, typically inside your `App.js` or equivalent root component.
Change your import statement for the `Toast` component to use the default export: `import Toast from 'react-native-toast-message';`.
Follow the specific documentation for 'How to show the Toast inside a Modal?' or 'How to render the Toast when using a Navigation library?' provided in the library's README. Generally, the `<Toast />` component should be placed outside of these elements or inside a dedicated provider/wrapper.
If using a custom type, declare it with `type: 'customType'` and ensure you extend `ToastOptions` with your custom props. For example, `declare module 'react-native-toast-message' { export interface ToastOptions { customProp?: string; } }`.