#egui #notifications #toast #notify

egui-notify

Simple notifications library for egui

23 releases (breaking)

0.18.0 Dec 18, 2024
0.17.0 Oct 17, 2024
0.16.0 Oct 1, 2024
0.15.0 Jul 10, 2024
0.4.4 Nov 1, 2022

#62 in GUI

Download history 802/week @ 2024-10-05 771/week @ 2024-10-12 980/week @ 2024-10-19 1194/week @ 2024-10-26 981/week @ 2024-11-02 663/week @ 2024-11-09 715/week @ 2024-11-16 694/week @ 2024-11-23 756/week @ 2024-11-30 913/week @ 2024-12-07 1196/week @ 2024-12-14 693/week @ 2024-12-21 800/week @ 2024-12-28 1319/week @ 2025-01-04 1720/week @ 2025-01-11 1379/week @ 2025-01-18

5,270 downloads per month
Used in 15 crates (12 directly)

MIT license

110KB
584 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
~85K SLoC