2.3.0 • Published 12 months ago
react-toast-master v2.3.0
React-Toast-Master
🏆 React's most customizable toast component!
Installation
$ npm install react-toast-master
$ yarn add react-toast-master
💡 Simple Example
import React from "react";
import { ToastProvider, useToast } from "react-toast-master";
function App() {
const { toastMaster } = useToast();
const showToast = () => {
toastMaster({
type: "success",
message: "Hello World!",
});
};
return (
<ToastProvider>
<button onClick={showToast}>Toast</button>
</ToastProvider>
);
}
💡 With More Customization ( with Tailwind CSS )
import React from "react";
import { ToastProvider, useToast } from "react-toast-master";
function App() {
const { toastMaster } = useToast();
const showToast = () => {
toastMaster({
type: "errorWhite",
message: "Uh oh! Something went wrong.",
footer: (
<div className="flex justify-between w-full">
<p>There was a problem with your request.</p>{" "}
<span className="border border-white cursor-pointer duration-100 hover:bg-white hover:text-[#dc2626] h-min px-2 rounded-sm text-white whitespace-nowrap">
Try again
</span>
</div>
),
align: "left",
position: "bottomRight",
bg: "error",
transition: "top",
shadow: "white",
cancelButton: true,
});
};
return (
<ToastProvider>
<button onClick={showToast}>Toast</button>
</ToastProvider>
);
}
📔 Documentation and Demo
Check website to get a better understanding!
📜 License
Licensed under MIT
2.3.0
12 months ago
2.2.1
1 year ago
2.1.2
1 year ago
2.2.0
1 year ago
2.1.1
1 year ago
2.0.2
1 year ago
2.2.3
1 year ago
2.1.4
1 year ago
2.0.5
1 year ago
2.2.2
1 year ago
2.1.3
1 year ago
2.0.4
1 year ago
2.2.5
1 year ago
2.1.6
1 year ago
2.0.7
1 year ago
2.2.4
1 year ago
2.1.5
1 year ago
2.0.6
1 year ago
2.2.7
1 year ago
2.1.8
1 year ago
2.0.9
1 year ago
2.2.6
1 year ago
2.1.7
1 year ago
2.0.8
1 year ago
2.1.0
1 year ago
2.0.1
1 year ago
2.0.0
1 year ago
2.2.9
1 year ago
2.2.8
1 year ago
2.1.9
1 year ago
1.1.7
1 year ago
1.1.6
1 year ago
1.1.1
1 year ago
1.0.0
1 year ago