#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 537/week @ 2024-01-28 918/week @ 2024-02-04 649/week @ 2024-02-11 1116/week @ 2024-02-18 788/week @ 2024-02-25 733/week @ 2024-03-03 791/week @ 2024-03-10 849/week @ 2024-03-17 941/week @ 2024-03-24 804/week @ 2024-03-31 569/week @ 2024-04-07 636/week @ 2024-04-14 616/week @ 2024-04-21 785/week @ 2024-04-28 457/week @ 2024-05-05 394/week @ 2024-05-12

2,321 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
~81K SLoC