Skip to main content

Crate egui_styled

Crate egui_styled 

Source
Expand description

Tailwind-style utility styling for an immediate-mode toolkit.

egui_styled wraps egui’s widgets with builder APIs that handle the per-widget visuals_mut dance for you, plus a small design-token theme system. See the README for a Before/After comparison.

§Quick start

use egui_styled::prelude::*;

Styled::button("Save")
    .bg(theme.accent)
    .hover_bg(theme.accent_hover)
    .text_color(theme.fg_on_accent)
    .corner_radius(theme.rounding_md)
    .show(ui);

The prelude module re-exports everything you usually need.

Re-exports§

pub use apply::Apply;
pub use color::ColorExt;
pub use color::rgb;
pub use color::rgba;
pub use containers::area::StyledArea;
pub use containers::column::StyledColumn;
pub use containers::distribute::DistributedRow;
pub use containers::frame::StyledFrame;
pub use containers::row::StyledRow;
pub use containers::spacer::StyledSpacer;
pub use containers::stack::StyledStack;
pub use containers::wrap::WrappingRow;
pub use style::shared_style::Distribution;
pub use style::shared_style::BackgroundImageFit;
pub use style::shared_style::BgGradient;
pub use style::shared_style::BorderGradient;
pub use style::shared_style::Gradient;
pub use style::shared_style::GradientAxis;
pub use style::shared_style::InnerGlow;
pub use style::shared_style::LinearGradient;
pub use style::shared_style::Shadow;
pub use style::shared_style::Sides;
pub use theme::StyledTheme;
pub use theme::theme_ext::DesignSlots;
pub use theme::theme_ext::ThemeExt;
pub use theme::web_palette::WebPalette;
pub use widgets::button::StyledButton;
pub use widgets::checkbox::StyledCheckbox;
pub use widgets::combo_box::StyledComboBox;
pub use widgets::image::StyledImage;
pub use widgets::label::StyledLabel;
pub use widgets::slider::StyledSlider;
pub use widgets::text_edit::StyledTextEdit;
pub use widgets::text_effects::Glow;
pub use widgets::text_effects::GlowQuality;
pub use widgets::text_effects::TextEffects;
pub use widgets::text_effects::TextShadow;

Modules§

apply
color
containers
prelude
Commonly-used items. Glob-import this to write a styled UI without reaching into the crate’s module paths.
state
style
theme
widgets

Macros§

impl_style_builders

Structs§

Styled
Entry-point namespace for constructing styled widgets and containers.