Elegant UI elements for egui
HEALTH ? 95 / Healthy
// readme
egui-elegance
Opinionated widgets for [egui]: six-accent rounded buttons, text inputs with a focus ring and submit-flash feedback, themed selects and tabs, segmented LED toggles, status pills, and badges β all driven by a single installable Theme. Four palettes ship built-in β two dark (Theme::slate, Theme::charcoal) and two light (Theme::frost, Theme::paper) β paired so you can toggle without any layout shift.
The design aims to make native apps feel as polished as modern web UIs.
Install
cargo add egui-elegance
or, in Cargo.toml:
[dependencies]
egui = "0.37"
egui-elegance = "0.20"
The crate is published as egui-elegance but the library name is elegance, so imports look like use elegance::Button;.
MSRV: Rust 1.95.
Quick start
Install the theme once per Context, then drop widgets into any Ui the way you would an egui built-in:
use elegance::{Accent, Button, Card, Checkbox, TextInput, Theme};
struct App {
email: String,
remember: bool,
}
impl eframe::App for App {
fn ui(&mut self, ui: &mut egui::Ui, _: &mut eframe::Frame) {
Theme::slate().install(ui.ctx()); // cheap to call everyβ¦