| Crates.io | yew-notifications |
| lib.rs | yew-notifications |
| version | 0.2.0 |
| created_at | 2025-01-17 20:46:49.827483+00 |
| updated_at | 2025-01-17 22:56:03.135185+00 |
| description | Toaster components library for Yew |
| homepage | https://github.com/TheBestTvarynka/yew-notifications |
| repository | https://github.com/TheBestTvarynka/yew-notifications |
| max_upload_size | |
| id | 1520981 |
| size | 1,885,784 |
Table of content:
Notifications components library for Yew. It's like react-toastify but for yew and more simpler (so far :smirk:).
Documentation: https://docs.rs/yew-notifications/


Where it already used?
I was writing my personal project crypto-helper some time ago. I was forced to write awful code to add some notifications functionality to my web app. So, I decided to write this library that allows the easy showing of notifications to users.
Inspired by yew-toastrack: https://github.com/kinnison/linkdoku/tree/main/yew-toastrack .
yew-notifications implements standard (default) notifications but you can write your own. See basic and custom examples for more information.# Cargo.toml
# if you want to use standard notification components
yew-notifications = { version = "0.2", features = ["standard-notification"] }
# if you decide to write and use custom notification components
yew-notifications = "0.2"
NotificationProvider:// Notification, NotificationFactory - your notification types.
// They can be imported from this library or written by yourself (see `custom` example).
// component_creator is an instance of the NotificationFactory
<NotificationsProvider<Notification, NotificationFactory> {component_creator}>
// some inner components
</NotificationsProvider<Notification, NotificationFactory>>
use yew_notifications::use_notification;
// Notification - your notification type.
// It can be imported from this library or written by yourself (see `custom` example).
let notifications_manager = use_notification::<Notification>();
notifications_manager.spawn(Notification::new(...));
See the examples directory for the code examples.
At this point, this library has minimal functionality implemented. I plan to improve it continuously according to my needs. If you have any feature requests, then create an issue with the description. It'll be a priority for me.
Pavlo Myroniuk - the.best.tvarynka@gmail.com.
Distributed under the MIT license.
Feel free to contribute.
git checkout -b feature/fooBar)git commit -am 'Add some fooBar')git push origin feature/fooBar)