A lightweight, zero-config, customizable React toast notification library — just plug and play.
- Extremely fast and minimal
- Works with both
import
andrequire
- Easy to style with utility classes
- Works with React 18+
- Supports multiple variants (success, error and more coming soon)
npm install react-toast-msg
import { ToastContainer, toast } from 'react-toast-msg';
function App() {
return (
<>
<ToastContainer />
<button onClick={() => toast.success('This is a success toast!')}>
Show Success Toast
</button>
<button onClick={() => toast.error('This is an error toast!')}>
Show Error Toast
</button>
</>
);
}
toast.success('Success message!');
toast.error('Something went wrong!');
// More coming soon
Property | Description | Default |
---|---|---|
duration |
Duration of the toast in milliseconds | 3000 |
react-toast-msg is an open-source project — and you can help make it better! Whether you want to:
- Suggest new features
- Improve performance or accessibility
- Fix bugs
- Refactor code or improve documentation
We’d love your input!
Start by checking out the GitHub repo — issues, discussions, and PRs are welcome. Let's build something amazing together 🚀