#egui #notifications #toast #notify

egui-notify

Simple notifications library for EGUI

19 releases (breaking)

0.14.0 Mar 27, 2024
0.12.0 Jan 8, 2024
0.11.0 Nov 23, 2023
0.7.0 Jun 20, 2023
0.4.4 Nov 1, 2022

#77 in GUI

Download history 297/week @ 2024-01-01 506/week @ 2024-01-08 476/week @ 2024-01-15 608/week @ 2024-01-22 555/week @ 2024-01-29 955/week @ 2024-02-05 587/week @ 2024-02-12 1158/week @ 2024-02-19 748/week @ 2024-02-26 769/week @ 2024-03-04 796/week @ 2024-03-11 994/week @ 2024-03-18 780/week @ 2024-03-25 792/week @ 2024-04-01 587/week @ 2024-04-08 647/week @ 2024-04-15

3,030 downloads per month
Used in 9 crates

MIT license

105KB
567 lines

egui-notify

Simple notifications library for egui

example_image

example_video

Usage

use egui_notify::Toasts;
use std::time::Duration;

// initialize once
let mut toasts = Toasts::default();
// somewhere within [egui::App::update]...
toasts.info("Hello world!").set_duration(Duration::from_secs(5));
// ...
toasts.show(ctx);

Installation

[dependencies]
egui-notify = "0.10"

Difference to egui-toast

egui-notify has

  • Animations for appearing/disappearing toasts
  • Duration meter for expiring toasts
  • Toast positioning not influenced by which Context you pass to it (like if for example, you passed in a Context already altered for an egui::Window)
  • Differing methodology (create Toasts instance once, save save somewhere in application state)
  • Threadsafe Toasts instance, implements Send, Sync.
  • No support for custom toasts

Dependencies

~4–11MB
~78K SLoC