ms-ui-toast
v0.0.12
Published
test toast ui
Readme
🥪 m-toast
A lightweight, customizable toast notification library for modern web applications.
🚀 Features
- ⚡ Super fast and easy to use
- 🛠️ Simple API for showing/hiding toasts
💡 Inspiration
m-toast was inspired by react-hot-toast and @pheralb/toast
📦 Installation library
npm install ms-ui-toast🛠️ Usage
- Add the toast provider:
// 📃 root.tsx
import { Toaster } from "ms-ui-toast";
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<App />
<Toaster />
</React.StrictMode>,
);
2.Usage
// 📃 index.tsx
import { toast } from "ms-ui-toast";
export default function Toast() {
return (
<>
<button
onClick={() =>
toast.success({
title: "Done",
description: "Your request was successfully",
})
}
>
SUCCESS
</button>
</>
);
}🎛️ Customization
Easily customize the delay and behavior of your toasts via options.
<button
onClick={() =>
toast.default({
title: "Well done",
description: "Thanks for your support",
options: { duration: 5000 },
})
}
>
DEFAULT
</button>📚 Stack
🤝 Contributing
Contributions are welcome! Please open issues or pull requests.
- Click here to fork the repository.
📄 License
MIT License
Made with ❤️ by Marlon
