11 releases (5 breaking)

0.6.0 Feb 8, 2023
0.5.0 Dec 8, 2022
0.4.4 Nov 1, 2022

#50 in GUI

Download history 523/week @ 2022-11-30 592/week @ 2022-12-07 526/week @ 2022-12-14 399/week @ 2022-12-21 234/week @ 2022-12-28 322/week @ 2023-01-04 387/week @ 2023-01-11 498/week @ 2023-01-18 158/week @ 2023-01-25 186/week @ 2023-02-01 1302/week @ 2023-02-08 665/week @ 2023-02-15 603/week @ 2023-02-22 589/week @ 2023-03-01 791/week @ 2023-03-08 480/week @ 2023-03-15

2,573 downloads per month
Used in 8 crates (6 directly)

MIT license

105KB
514 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.4"

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)
  • No support for custom toasts

Dependencies

~3–7MB
~106K SLoC