#egui #notifications #toast #notify

egui-notify

Simple notifications library for EGUI

20 releases (breaking)

0.15.0 Jul 10, 2024
0.14.0 Mar 27, 2024
0.13.0 Feb 7, 2024
0.11.0 Nov 23, 2023
0.4.4 Nov 1, 2022

#79 in GUI

Download history 703/week @ 2024-04-03 605/week @ 2024-04-10 638/week @ 2024-04-17 605/week @ 2024-04-24 699/week @ 2024-05-01 405/week @ 2024-05-08 502/week @ 2024-05-15 550/week @ 2024-05-22 628/week @ 2024-05-29 514/week @ 2024-06-05 522/week @ 2024-06-12 474/week @ 2024-06-19 531/week @ 2024-06-26 561/week @ 2024-07-03 646/week @ 2024-07-10 622/week @ 2024-07-17

2,478 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.5–10MB
~83K SLoC