#egui #notifications #toast #notify

egui-notify

Simple notifications library for egui

24 releases (breaking)

new 0.19.0 Feb 7, 2025
0.18.0 Dec 18, 2024
0.17.0 Oct 17, 2024
0.15.0 Jul 10, 2024
0.4.4 Nov 1, 2022

#59 in GUI

Download history 983/week @ 2024-10-24 1016/week @ 2024-10-31 796/week @ 2024-11-07 670/week @ 2024-11-14 765/week @ 2024-11-21 699/week @ 2024-11-28 864/week @ 2024-12-05 1113/week @ 2024-12-12 983/week @ 2024-12-19 677/week @ 2024-12-26 1214/week @ 2025-01-02 1394/week @ 2025-01-09 1728/week @ 2025-01-16 1093/week @ 2025-01-23 1748/week @ 2025-01-30 2038/week @ 2025-02-06

6,886 downloads per month
Used in 15 crates (12 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.5–9MB
~89K SLoC