NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io, #1965 most downloaded on crates.io
Minimal 2D graphics library for GUI work
Latest stable
0.37.0
Last release 1 months ago
15 Oct 2026
Ships fairly regularly
a new release about every 5 weeks
Nearly every release is documented
notes for 49 of 49 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
51 releases · first in 2021
Drag across the ruler to compare, or tap a release to open it.
egui is an easy-to-use immediate mode GUI in pure Rust. eframe is the official egui framework, allowing you to run egui on both web and native.
egui is an easy-to-use immediate mode GUI in pure Rust. eframe is the official egui framework, allowing you to run egui on both web and native.
This release contains a simple and powerful image API:
// Load from web:
ui.image("https://www.example.com/some_image.png");
// Include image in the binary using `include_bytes`:
ui.image(egui::include_image!("../assets/ferris.svg"));
// With options:
ui.add(
egui::Image::new("file://path/to/image.jpg")
.max_width(200.0)
.rounding(10.0),
);
The API is based on a plugin-system, where you can tell egui how to load the images, and from where.
egui_extras comes with loaders for you, so all you need to do is add the following to your Cargo.toml:
egui_extras = { version = "0.23", features = ["all_loaders"] }
image = { version = "0.24", features = ["jpeg", "png"] } # Add the types you want support for
And this to your code:
egui_extras::install_image_loaders(egui_ctx);
Try the live demo at https://www.egui.rs/
This release contains a simple and powerful image API:
// Load from web:
ui.image("https://www.example.com/some_image.png");
// Include image in the binary using `include_bytes`:
ui.image(egui::include_image!("../assets/ferris.svg"));
// With options:
ui.add(
egui::Image::new("file://path/to/image.jpg")
.max_width(200.0)
.rounding(10.0),
);
The API is based on a plugin-system, where you can tell egui how to load the images, and from where.
egui_extras comes with loaders for you, so all you need to do is add the following to your Cargo.toml:
egui_extras = { version = "0.23", features = ["all_loaders"] }
image = { version = "0.24", features = ["jpeg", "png"] } # Add the types you want support for
And this to your code:
egui_extras::install_image_loaders(egui_ctx);
puffin feature to egui #3298trace! macro as this is more useful #3391Context::open_url and Context::copy_text #3380Area::constrain_to and Window::constrain_to #3396Memory::area_rect #3161 (thanks @tosti007!)Margin::expand_rect and shrink_rect #3214into_inner() for egui::mutex::{Mutex, RwLock} #3110 (thanks @KmolYuan!)Option<f32> instead of f32 #3240 (thanks @lucasmerlin!)Window::drag_to_scroll #3118 (thanks @KYovchevski!)CollapsingState::remove to clear stored state #3252 (thanks @dmackdev!)Context::is_context_menu_open() #3267 (thanks @dmlary!)mime field to DroppedFile #3273 (thanks @abey79!)scroll_area::State::velocity #3300 (thanks @Barugon!)Visuals::interact_cursor #3312 (thanks @zkldi!)RichText making it easier to construct layout jobs #3319 (thanks @OmegaJak!)Context::style_mut #3359std::borrow::Cow<'_, str> now implements TextBuffer #3164 (thanks @burtonageo!)DragValue: update value on each key press by default #2880 (thanks @Barugon!)RangeInclusive<f32> with emath::Rangef #3221Send + Sync for ColorPickerFn and Ui (#3148) #3233 (thanks @idanarye!)menu_image_button to use ImageButton builder #3288 (thanks @v-kat!)DragValue when only setting min_decimals #3231ScrollArea #2860 (thanks @Barugon!)Your coding agent can read these notes before it upgrades. Set up the MCP server →
ColorImage::from_gray #3166 (thanks @thomaseliot!)into_inner() for egui::mutex::{Mutex, RwLock} #3110 (thanks @KmolYuan!)ClippedShape from struct-enum to a normal struct #3225Galleys get invalidated #3024 (thanks @e00E!)egui is an easy-to-use immediate mode GUI in pure Rust. eframe is the official egui framework, allowing you to run egui on both web and native.
egui is an easy-to-use immediate mode GUI in pure Rust. eframe is the official egui framework, allowing you to run egui on both web and native.
There's a bunch of improvements in 0.22, especially to eframe:
NativeOptions::icon_dataNativeOptions::follow_system_theme. Works both on native and on web!Try the live demo at https://www.egui.rs/
Grid::with_row_color #2519 (thanks @imgurbot12!)Pointer::is_decidedly_dragging and could_any_button_be_click #2979TextEdit #2816 (thanks @wzid!)egui::Modifiers::contains #2989 (thanks @Wumpf!)ComboBox::show_index String with Into<TextWidget> #2790 (thanks @tosti007!)tracing with log #2928Plot::link_axis and Plot::link_cursor now take the name of the group #2410show_blocking_widget #2753 (thanks @YgorSouza!)data() read mutability #2742 (thanks @IS2511!)Response::triple_clicked in docs #2867 (thanks @ccaven!)request_repaint_after works even when called from background thread #2939"Option", not "Alt" #2981 (thanks @Wumpf!)store in TextEditState doc comment #2988 (thanks @fxdave!)enum instead of strings for demo-selector anchor #2781 (thanks @XyLyXyRR!)env_logger in all examples #2934examples/user_attention/README.mg to README.md #2948 (thanks @MAlba124!)epaint without bytemuck dependency #2913 (thanks @lunixbochs!)TextureId::Managed(0) #2998 (thanks @andersk!)This is a relatively minor release, but with a major breaking change in the egui API to prevent a rare deadlock.
This is a relatively minor release, but with a major breaking change in the egui API to prevent a rare deadlock.
Full changelog: https://github.com/emilk/egui/blob/master/CHANGELOG.md
egui::Context now use closures for locking (#2625):
ctx.input().key_pressed(Key::A) -> ctx.input(|i| i.key_pressed(Key::A))ui.memory().toggle_popup(popup_id) -> ui.memory_mut(|mem| mem.toggle_popup(popup_id))Response::drag_started_by and Response::drag_released_by for convenience, similar to dragged and dragged_by (#2507).PointerState::*_pressed to check if the given button was pressed in this frame (#2507).Event::Key now has a repeat field that is set to true if the event was the result of a key-repeat (#2435).Slider::drag_value_speed, which lets you ask for finer precision when dragging the slider value rather than the actual slider.Memory::any_popup_open, which returns true if any popup is currently open (#2464).Plot::clamp_grid to only show grid where there is data (#2480).ScrollArea::drag_to_scroll if you want to turn off that feature.Response::on_hover_and_drag_cursor.Window::default_open (#2539).ProgressBar::fill if you want to set the fill color manually. (#2618).Button::rounding to enable round buttons (#2616).WidgetVisuals::optional_bg_color - set it to Color32::TRANSPARENT to hide button backgrounds (#2621).Context::screen_rect and Context::set_cursor_icon (#2625).Visuals::indent_has_left_vline (#2636).Response.highlight to highlight a widget (#2632).Separator::grow and Separator::shrink (#2665).Slider::trailing_fill for trailing color behind the circle like a ProgressBar (#2660).Plot.ComboBox is now controlled with Spacing::combo_width (#2621).DragValue and Slider now use the proportional font (#2638).ScrollArea is less aggressive about clipping its contents (#2665).DragValue behavior (#2649, #2650, #2688, #2638).PointerEvent::Released for drags (#2507).TextEdit's multiline flag to AccessKit (#2448).\r (Carriage Return) (#2452).button_padding style option works closer as expected with image+text buttons now (#2510).Window::pivot causing windows to move around (#2694).egui changelog: https://github.com/emilk/egui/blob/master/CHANGELOG.md eframe changelog: https://github.com/emilk/egui/blob/master/crates/eframe/CHANG
egui changelog: https://github.com/emilk/egui/blob/master/CHANGELOG.md
eframe changelog: https://github.com/emilk/egui/blob/master/crates/eframe/CHANGELOG.md
1.65.0 (#2314).Context::os/Context::set_os to query/set what operating system egui believes it is running on (#2202).Button::shortcut_text for showing keyboard shortcuts in menu buttons (#2202).egui::KeyboardShortcut for showing keyboard shortcuts in menu buttons (#2202).TextureOptions with minification and magnification filters (#2224).Key::Minus and Key::Equals (#2239).egui::gui_zoom module with helpers for scaling the whole GUI of an app (#2239).spacing.menu_margin for customizing menu spacing (#2036)egui::ComboBox (#2272)Area::constrain and Window::constrain which constrains area to the screen bounds (#2270).Area::pivot and Window::pivot which controls what part of the window to position (#2303).panel_fill, window_fill and window_stroke to Visuals for your theming pleasure (#2406).egui::color has been renamed egui::ecolor (#2399).Context::set_pixels_per_point (#2239).DragValue (#2342).ScrollAreas inside each other, the inner area will now move its scroll bar so it is always visible (#2371).input.key_pressed (#2334, #2389).set_pixels_per_point each frame (#2352).ScrollArea::show_rows (#2258).plot::Line::fill (#2275).changed events in radio_value and selectable_value if the value actually changed (#2343).Grid (#2384).ComboBox::width now correctly sets the outer width (#2406).Fonts::has_glyph(s) for querying if a glyph is supported (#2202).ecolor (#2399).eframe continues after closing native window
Highlights:
Context::request_repaint_afteregui changelog: https://github.com/emilk/egui/blob/master/CHANGELOG.md eframe changelog: https://github.com/emilk/egui/blob/master/crates/eframe/CHANGELOG.md
*_released & *_clicked methods for PointerState (#1582).PointerButton::Extra1 and PointerButton::Extra2 (#1592).egui::hex_color! to create Color32's from hex strings under the color-hex feature (#1596).deadlock_detection to detect double-lock of mutexes on the same thread (#1619).InputState::stable_dt: a more stable estimate for the delta-time in reactive mode (#1625).egui::Key (#1665).PaintCallback shapes with the WGPU backend (#1684).Context::request_repaint_after (#1694).ctrl-h now acts like backspace in TextEdit (#1812).custom_formatter method for Slider and DragValue (#1851).RawInput::has_focus which backends can set to indicate whether the UI as a whole has the keyboard focus (#1859).PointerState::button_double_clicked() and PointerState::button_triple_clicked() (#1906).custom_formatter, binary, octal, and hexadecimal to DragValue and Slider (#1953)1.61.0 (#1846).PaintCallback shapes now require the whole callback to be put in an Arc<dyn Any> with the value being a backend-specific callback type (#1684).needs_repaint in FullOutput with repaint_after. Used to force repaint after the set duration in reactive mode (#1694).Layout::left_to_right and Layout::right_to_left now takes the vertical align as an argument. Previous default was Align::Center.Vec<[f64; 2]>. The Value and Values types were removed in favor of PlotPoint and PlotPoints respectively (#1816).TextBuffer no longer needs to implement AsRef<str> (#1824).Response::changed for ui.toggle_value (#1573).ImageButton's changing background padding on hover (#1595).Plot auto-bounds bug (#1599).ScrollArea scrolling when editing an unrelated TextEdit (#1779).Slider not always generating events on change (#1854).1.61.0 (#1846).epaint::hex_color! to create Color32's from hex strings under the color-hex feature (#1596).deadlock_detection to detect double-lock of mutexes on the same thread (#1619).TextureOptions with minification and magnification filters (#2224).Change Shape::Callback from &dyn Any to &mut dyn Any to support more backends.
Shape::Callback from &dyn Any to &mut dyn Any to support more backends.Better text contrast in bright mode
Highlights:
Shape::Callback for backend-specific painting, with an example (#1351).Frame::canvas (#1362).Context::request_repaint will now wake up UI thread, if integrations has called Context::set_request_repaint_callback (#1366).Plot::allow_scroll, Plot::allow_zoom no longer affects scrolling (#1382).Ui::push_id to resolve id clashes (#1374).ComboBox::icon (#1405).Ui::scroll_with_delta.Frame::outer_margin.Painter::hline and Painter::vline.Link and ui.link (#1506).Plot::x_grid_spacer and Plot::y_grid_spacer for custom grid spacing (#1180).Ui::spinner() shortcut method (#1494).CursorIcons for resizing columns, rows, and the eight cardinal directions.Ui::toggle_value.1.60.0 (#1467).ClippedMesh has been replaced with ClippedPrimitive (#1351).Frame::margin to Frame::inner_margin.AlphaImage to FontImage to discourage any other use for it (#1412).Id clash for Grid, Plot or ScrollArea (#1452).Checkbox and RadioButton with an empty label ("") will now take up much less space (#1456).Memory::top_most_layer with more flexible Memory::layer_ids.convert_bytemuck to bytemuck (#1467).serialize to serde (#1467).Painter::sub_region to Painter::with_clip_rect.ComboBoxes always being rendered left-aligned (#1304).Ui::add_visible sometimes leaving the Ui in a disabled state (#1436).CollapsingHeader::selectable (#1538).single_threaded/multi_threaded flags - egui is now always thread-safe (#1390).1.60.0 (#1467).Shape::Callback for backend-specific painting (#1351).TextWrapping struct containing all wrapping options.LayoutJob::wrap field containing these options.LayoutJob::wrap_width to TextWrapping::max_width.TextWrapping::max_rows to limit amount of rows the text should have.TextWrapping::break_anywhere to control should the text break at appropriate places or not.TextWrapping::overflow_character to specify what character should be used to represent clipped text.single_threaded/multi_threaded flags - epaint is now always thread-safe (#1390).Tessellator::from_options is now Tessellator::new (#1408).TessellationOptions::anti_alias to feathering (#1408).AlphaImage to FontImage to discourage any other use for it (#1412).Shape::Vec containing meshes with differing TextureIds (#1445).Shape::galley_with_color which adds the functionality of Painter::galley_with_color into the Shape enum (#1461).convert_bytemuck to bytemuck (#1467).serialize to serde (#1467).Easy image loading using new crate egui_extras
egui highlights:
eframe highlights:
Full changelog: https://github.com/emilk/egui/blob/master/CHANGELOG.md
RichText::size amd RichText::family and the new FontId.Style::text_styles.Ui::text_style_height.TextStyle::resolve.Plot::x_axis_formatter and Plot::y_axis_formatter for custom axis labels (#1130).Plot::allow_boxed_zoom(), Plot::boxed_zoom_pointer() for boxed zooming on plots (#1188).Plot::coordinates_formatter (#1235).plot::LinkedAxisGroup (#1184).Context::load_texture to convert an image into a texture which can be displayed using e.g. ui.image(texture, size) (#1110).Ui::input_mut to modify how subsequent widgets see the InputState and a convenience method InputState::consume_key for shortcuts or hotkeys (#1212).Ui::add_visible and Ui::add_visible_ui.CollapsingHeader::icon to override the default open/close icon using a custom function. (1147).ui.data(), ctx.data(), ctx.options() and ctx.tessellation_options() (#1175).Response::on_hover_text_at_pointer as a convenience akin to Response::on_hover_text (1179).tracing crate for logging warnings (#1192).ui.weak(text).Slider::step_by (1225).Context::move_to_top and Context::top_most_layer for managing the layer on the top (#1242).TextEdit (#1243).Ui::scroll_to_rect (1252).Context::input and Ui::input now locks a mutex. This can lead to a dead-lock is used in an if let binding!
if let Some(pos) = ui.input().pointer.latest_pos() and similar must now be rewritten on two lines.if let .*input.CtxRef to Context (#1050).Context can now be cloned and stored between frames (#1050).Ui::visible to Ui::is_visible.Event::Text into Event::Text and Event::Paste (#1058).Style::body_text_style with more generic Style::text_styles (#1154).TextStyle is no longer Copy (#1154).TextEdit::text_style with TextEdit::font (#1154).Plot::highlight now takes a bool argument (#1159).ScrollArea::show now returns a ScrollAreaOutput, so you might need to add .inner after the call to it (#1166).corner_radius: f32 with rounding: Rounding, allowing per-corner rounding settings (#1206).margin: Vec2 with margin: Margin, allowing for different margins on opposing sides (#1219).Plot::custom_label_func to Plot::label_formatter (#1235).Areas::layer_id_at ignores non-interatable layers (i.e. Tooltips) (#1240).ScrollAreas will not shrink below a certain minimum size, set by min_scrolled_width/min_scrolled_height (1255).Output has now been renamed PlatformOutput and Context::run now returns the new FullOutput (#1292).FontImage has been replaced by TexturesDelta (found in FullOutput), describing what textures were loaded and freed each frame (#1110).RawInput::max_texture_side which should be filled in with e.g. GL_MAX_TEXTURE_SIZE (#1154).Orientation was not public, although fields using this type were (#1130).Context::set_pixels_per_point before the first frame will now work.TextStyle with FontId which lets you pick any font size and font family.Fonts::font_image with font_image_delta for partial font atlas updates.ImageData and TextureManager for loading images into textures (#1110).Shape::dashed_line_many (#1027).corner_radius: f32 with rounding: Rounding, allowing per-corner rounding settings (#1206).Rich text (colors, underline, …) in all widgets
Highlights:
Ui::menu_button and Response::context_menu (#543).Label, Button etc) now supports rich text (#855).TextEdit (#848).Slider::new(…).vertical() (#875).Button::image_and_text (#832).CollapsingHeader::open to control if it is open or collapsed (#1006).egui::widgets::color_picker::color_picker_color32 to show the color picker.1.56.0.ui.add(Button::new("…").text_color(…)) is now ui.button(RichText::new("…").color(…)) (same for Label )(#855).show method that has to be used to add items to and show the plot (#766).menu::menu(ui, ...) is now ui.menu_button(...) (#543)CtxRef::begin_frame and end_frame with CtxRef::run (#872).scroll_delta and zoom_delta in RawInput with Event::Scroll and Event::Zoom.Memory data buckets (data, data_temp, id_data and id_data_temp) into a single Memory::data, with a new interface (#836).Ui::__test with egui::__run_test_ui (#872).ComboBox and other popups getting clipped to parent window (#885).egui::math (use egui::emath instead).egui::paint (use egui::epaint instead).New crate egui_glow: a glow backend for eframe (opt-in)
Highlights:
egui_glow: a glow backend for eframe (opt-in)egui-web<img src="media/egui-0.15-code-editor.gif">
ScrollArea and Window (opt-in).TextEdit::layouter: Add custom text layout for e.g. syntax highlighting or WYSIWYG.Fonts::layout_job: New text layout engine allowing mixing fonts, colors and styles, with underlining and strikethrough.ui.add_enabled(bool, widget) to easily add a possibly disabled widget.ui.add_enabled_ui(bool, |ui| …) to create a possibly disabled UI section."serialize" separately from "persistence".egui::widgets::global_dark_light_mode_buttons to easily add buttons for switching the egui theme.TextEdit can now be used to show text which can be selected and copied, but not edited.Memory::caches for caching things from one frame to the next.Ui it is in.Hyperlink will now word-wrap just like a Label.Uis must now have a finite max_rect.
max_rect_finite, available_size_before_wrap_finite and available_rect_before_wrap_finite.Painter/Fonts: text layout now expect a color when creating a Galley. You may override that color with Painter::galley_with_color.1.54.0.DragValues no longer show a tooltip when hovered. Change with Style::explanation_tooltips.ScrollArea will auto-shrink to content size unless told otherwise using ScrollArea::auto_shrink.Slider's clamp_to_range is set to true.TextEdit::enabled to TextEdit::interactive.ui.label (and friends) now take impl ToString as argument instead of impl Into<Label>.TextEdit in justified layouts.Button::enabled with ui.add_enabled.Fonts::layout_job: New text layout engine allowing mixing fonts, colors and styles, with underlining and strikethrough.CircleShape, PathShape, RectShape and TextShape used in enum Shape.TextShape)."convert_bytemuck" feature.Highlights: * Panels inside of Ui:s * Progress bar * Improved text on web * Drag-and-drop files * A lot of bug fixes
Highlights:
Ui.show_background and show_axes methods to Plot.Grid::num_columns: allow the last column to take up the rest of the space of the parent Ui.RawInput).CollapsingHeader can now optionally be selectable.TextEdit will now clip text that doesn't fit in it, and scroll.Area::show, ComboBox::show_ui, ComboBox::combo_box_with_label, Window::show, popup::*, menu::menu.pixels_per_point is changed.lost_focus for TextEdit.Area.Plot's min_auto_bounds could be ignored after the first call to Plot::ui.More plot items: Arrows, Polygons, Text, Images.
SidePanel::right and Panel::bottom).Panel.ScrollArea::show_rows for efficient scrolling of huge UI:s.ScrollArea::enable_scrolling to allow freezing scrolling when editing TextEdit widgets within itUi::set_visible as a way to hide widgets.Style::override_text_style to easily change the text style of everything in a Ui (or globally).TextStyle on checkboxes, radio buttons and SelectableLabel.cint feature.extra_asserts and extra_debug_asserts to enable additional checks.TextEdit now supports edits on a generic buffer using TextBuffer.Context::set_debug_on_hover and egui::trace!(ui)Curve to Line.TopPanel::top is now TopBottomPanel::top.SidePanel::left no longer takes the default width by argument, but by a builder call.SidePanel::left is resizable by default.Added anchors to windows and areas so you can put a window in e.g. the top right corner.
Label::sense(Sense::click()).Response::request_focus and Response::surrender_focus.TextEdit::code_editor (VERY basic).egui::Memory.Response::on_disabled_hover_text to show tooltip for disabled widgets.eframe web) trackpad-pinch gesture.eframe web on mobile devices,
and should work with egui_glium for certain touch devices/screens.Memory::has_focus public (again).Plot must now be given a name that is unique within its scope.screen_reader option is turned on.ui.wrap to ui.scope.DragValues.egui_demo_libDeprecated combo_box_with_label in favor of new ComboBox.
DragValues.Window and Area to a specified area using drag_bounds(rect).ui.set_row_height.DebugOptions::show_widgets to debug layouting by hovering widgets.ComboBox to more easily customize combo boxes.Slider::new and DragValue::new to replace old type-specific constructors.TextEdit::password to hide input characters.ui.advance_cursor is now called ui.add_space.kb_focus is now just called focus.combo_box_with_label in favor of new ComboBox.Slider and DragValue (Slider::f32, DragValue::usize etc).Added egui::Plot to plot some 2D data.
<img src="media/egui-0.10-plot.gif" width="50%">
egui::plot::Plot to plot some 2D data.Ui::hyperlink_to(label, url)."°" works like a unit).Context::set_pixels_per_point to control the scale of the UI.Response::changed() to query if e.g. a slider was dragged, text was entered or a checkbox was clicked.DragValue and Slider (except 128-bit).Slider will now show the value display by default, unless turned off with .show_value(false).Slider value is now a DragValue which when dragged can pick values outside of the slider range (unless clamp_to_range is set).Added support for secondary and middle mouse buttons.
<img src="media/0.9.0-disabled.gif" width="50%">
Label methods for code, strong, strikethrough, underline and italics.ui.group(|ui| { … }) to visually group some widgets within a frame.Ui helpers for doing manual layout (ui.put, ui.allocate_ui_at_rect and more).ui.set_enabled(false) to disable all widgets in a Ui (grayed out and non-interactive).TextEdit::hint_text for showing a weak hint text when empty.egui::popup::popup_below_widget: show a popup area below another widget.Slider::clamp_to_range(bool): if set, clamp the incoming and outgoing values to the slider range.ui.spacing(), ui.spacing_mut(), ui.visuals(), ui.visuals_mut().ctx.set_visuals().Style::wrap.Grid::max_col_width.\n characters.mouse has been renamed pointer everywhere (to make it clear it includes touches too).Response are now methods, so if ui.button("…").clicked { is now if ui.button("…").clicked() {.Response::active is now gone. You can use response.dragged() or response.clicked() instead.DragValue::range is now called clamp_range and also clamps incoming values.Triangles to Mesh.struct ClippedMesh(Rect, Mesh).Mesh::split_to_u16 now returns a 16-bit indexed Mesh16.Added a simple grid layout (Grid).
<img src="media/widget_gallery_0.8.0.gif" width="50%">
Grid).ui.allocate_at_least and ui.allocate_exact_size.InputState::key_down.Window::current_pos to position a window.PaintCmd to Shape.(Rect, Shape) with tuple-struct ClippedShape."serde" to "persistence".math and paint into separate crates emath and epaint.Image and ImageButton will no longer stretch to fill a justified layout.One column per quarter.