react-modified-snackbar
v0.1.1
Published
<div align="center"> <a href="https://rohitsoni83.github.io/react-toast/"> <img alt="react-toast" width="600px" height="350px" classname="border-radius" src="https://www.linkpicture.com/q/react-toast.png"/></a> </div> <div align="center"> <a href="http
Readme
Features
- 🔥 Success, Error, Info, and Warning type Toast
- 🔩 Easily To Use
- ➖ Progressbar Visibility
- 🕊 Lightweight - less than 5kb including styles
- ✅ Accessible
- 🤯 Headless Hooks - _Create your own with [
useToaster()]
Installation
With NPM
npm install react-modified-snackbarGetting Started
Add the Toaster to your app first. It will take care of rendering all notifications emitted. Now you can trigger toast() from anywhere!
import toast, { Toaster } from "react-modified-snackbar";
const showToast = () => toast("I'm a toast.");
const App = () => {
return (
<div>
<button onClick={showToast}>Create a Toast</button>
<Toaster />
</div>
);
};