Description
react-local-toast is a React library that shows toast messages next to the component they relate to, instead of in one fixed corner of the page. It suits feedback such as a saved state or an error that belongs to a particular button, field or panel. Each toast is linked to a component in the DOM and can appear on the right, left, top or bottom side of it. Toasts hide after a timeout or can be hidden in code, and one component can show several toasts, which stack vertically. Info, success, warning, error and loading toasts are included, and you can bring your own design or your own toast component. The library has WAI-ARIA support and is written in TypeScript. Its styles are not injected automatically, so the README explains how to add them, including for cases such as Shadow DOM. The package is published on npm and the source is on GitHub. The README notes that version 2 has no API changes but no longer ships minified styles.…
Highlights
- Toasts linked to a specific component
- Placed on any side of the component
- Info, success, warning, error and loading styles
- Auto-hide after a timeout or hide in code
- WAI-ARIA support and TypeScript
Ratings & Reviews
No ratings yet
Be the first to rate react-local-toast.
People also visit
toastify-react-native
toastify-react-native allows you to add notifications to your react-native app
react-local-toast FAQ
What is react-local-toast?
A React library for showing toast messages beside the component they are about, rather than in a global corner of the page.
How do I start using it?
It is published on npm. Wrap your app in LocalToastProvider, mark the component that should own a toast, and add the styles yourself. The README's basic usage section walks through the steps.
Can I use my own toast design?
Yes. The README says you can bring your own design or your own toast component, or write a custom implementation.
Does it work in Shadow DOM?
The README says that for cases such as toasts in Shadow DOM you may want to inject the styles manually.
Is it accessible?
The README lists WAI-ARIA support among its features.
What are the best react-local-toast alternatives?
Popular alternatives to react-local-toast include react-toastify, react-hot-toast and goey-toast. See all react-local-toast alternatives


















