#notifications #egui

egui-notify

Simple notifications library for egui

22 releases (breaking)

0.17.0 Oct 17, 2024
0.15.0 Jul 10, 2024
0.14.0 Mar 27, 2024
0.11.0 Nov 23, 2023
0.4.4 Nov 1, 2022

#460 in Network programming

Download history 687/week @ 2024-07-18 771/week @ 2024-07-25 649/week @ 2024-08-01 668/week @ 2024-08-08 578/week @ 2024-08-15 432/week @ 2024-08-22 629/week @ 2024-08-29 586/week @ 2024-09-05 568/week @ 2024-09-12 668/week @ 2024-09-19 854/week @ 2024-09-26 855/week @ 2024-10-03 621/week @ 2024-10-10 1127/week @ 2024-10-17 983/week @ 2024-10-24 917/week @ 2024-10-31

3,810 downloads per month
Used in 14 crates (11 directly)

MIT license

110KB
578 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!").duration(Duration::from_secs(5));
// ...
toasts.show(ctx);

Installation

cargo add egui-notify
[dependencies]
egui-notify = "0.17.0"

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–9MB
~84K SLoC