buildio-toast v0.2.0
Buildio Toast 🍞 A lightweight and customizable toast notification library for React applications.
Features ✨ Multiple Toast Types: Success, Error, Warning, Info, and Loading.
Customizable: Easily customize toast messages and styles.
Dismissible: Manually dismiss individual toasts or all toasts at once.
React Hooks: Simple integration using the useBuildioToast hook.
TypeScript Support: Built with TypeScript for better type safety.
Installation 📦 Install the package using npm or yarn:
npm install buildio-toast or
yarn add buildio-toast Usage 🚀
- Wrap Your App with ToastProvider First, wrap your application with the ToastProvider component to enable toast notifications.
- Use the useBuildioToast Hook Now you can use the useBuildioToast hook in any component to display toasts.
API Reference 📚
ToastProvider A context provider that enables toast notifications in your app.
Props children: Your application components.
useBuildioToast A React hook that provides methods to display and dismiss toasts.
Customization 🎨 You can customize the appearance and behavior of toasts by passing options to the ToastProvider.
Options position: Toast position (top-right, top-left, bottom-right, bottom-left).
duration: Duration in milliseconds before the toast auto-dismisses.
style: Custom styles for the toast container.
Examples 🖼️ Basic Example
export default App;
Contributing 🤝
Contributions are welcome! Please follow these steps:
Fork the repository.
Create a new branch (git checkout -b feature/YourFeature).
Commit your changes (git commit -m "Add some feature").
Push to the branch (git push origin feature/YourFeature).
Open a pull request.
License 📄 This project is licensed under the MIT License. See the LICENSE file for details.
Support 💬 If you have any questions or issues, please open an issue on GitHub.
Enjoy using Buildio Toast! 🎉