7 releases
0.3.0 | Feb 25, 2025 |
---|---|
0.2.3 | Dec 17, 2024 |
0.2.0 | Sep 26, 2024 |
0.1.1 | Jul 18, 2024 |
#216 in GUI
298 downloads per month
33KB
550 lines
egui-theme-switch
A very pretty theme switch widget for your egui app. It allows you to choose between dark, light and follow system.

Example
use egui::ThemePreference;
use egui_theme_switch::{ThemeSwitch, global_theme_switch};
// A switch for egui's global theme preference:
global_theme_switch(ui);
// ... or alternatively:
let mut preference = ThemePreference::System;
if ui.add(ThemeSwitch::new(&mut preference)).changed() {
// ...
}
Interactive Demo
Docs
License
Licensed under either of
- Apache License, Version 2.0 (license-apache.txt or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (license-mit.txt or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Dependencies
~4.5–9.5MB
~90K SLoC