emilk/egui
 Watch   
 Star   
 Fork   
14 days ago
egui

0.37.0 - Colored emojis! 🚀



egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.

Try it now: https://www.egui.rs/

egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.

Highlights ✨

Emoji and glyph support

egui can now render any glyph that is supported on your system, including colored emojis and non-Latin scripts.

To enable this, the integration has to use one of two APIs:

  • Context::add_glyph_rasterizer(GlyphRasterizer): a GlyphRasterizer renders a single glyph. eframe uses this on web to render individual glyphs to an off-screen canvas #8490, #8545.
  • Context::add_font_provider(Arc<dyn FontProvider>): lets egui find and load whole fonts at runtime. Native eframe uses this through the new egui_system_font_provider crate, which lists system fonts with fontique #8512.

Completion popup

We've added a new CompletionPopup widget that adds autocomplete to a TextEdit. You can use it e.g. to add emoji selection like in discord:

https://github.com/user-attachments/assets/f688eca0-cedf-4d17-99b6-5158cccfdbda

Experimental theme customizations

This release adds a theme plugin system #8153 by @AdrienZianne. Enable the new experimental feature flag, and there will be a new StyleProvider trait, which can be used to customize visuals for a widget based on the provided classes.

/// Implement the trait for each Widget you'd like to customize
impl StyleProvider<ButtonStyle> for MyTheme {
  fn style(&mut self, args: &StyleArgs<'_>) -> ButtonStyle {
    // You could construct ButtonStyle from scratch, or extend eguis built in style:
    let mut style: ButtonStyle = DefaultStyle.style(args);
    if args.has_class("primary") {
      style.atom_layout.frame.fill = hex_color!("#FF0000");
    }
    style
  }
}

/// Register all your custom style providers
fn init(ctx: &Context) {
  ctx.add_widget_theme::<ButtonStyle>(MyTheme);
  ctx.add_widget_theme::<CheckboxStyle>(MyTheme);
  // ...
}

Record videos of integration tests

Reading an integration test to understand what its doing can be challenging, so we've added a egui_kittest/video feature that records a mp4 video from it, using ffmpeg! Enable it and pass EGUI_KITTEST_RECORD=1 or EGUI_KITTEST_RECORD=open, and a video of the test will be recorded. This is an example from one of our more complex rerun integration tests:

https://github.com/user-attachments/assets/6c8e2b15-4316-42a1-b18a-2f2fb6864db9

Improved accessibility

Other

  • Paste images from the clipboard: Event::PasteImage #8472 by @BernardDGS.
  • Aligned container, e.g. for centering a group of widgets #8540
  • CompletionPopup for code completion over a TextEdit #8529
  • RangeSlider #8580 by @gavrelina
  • Atoms: AtomLayout is split into WidgetAtom and ContainerAtom #8222.
  • Some style tweaks: roomier buttons and a larger corner radius #8617, #8445.
  • Nicer kinetic scrolling with rubber-banding on overshoot #8662, #8663

⚠️ Breaking changes

  • default_fonts is no longer a default feature #8583.
  • ViewportCommand::Screenshot now uses a callback #8489.
  • Id::new, AsId and From<&str> for Id are all deprecated #8534, #8586.
  • New: Id::unique, IdSaltSet, IdSaltMap #8534, #8590.
  • Panel constructors take impl AsIdSalt #8592.

⭐ Added

  • Add epaint::RoundedRect primitive #8440 by @emilk
  • Add BandShape #8476 by @emilk
  • Allow transforming after shapes were tessellated and rounded #8587 by @lucasmerlin
  • Add AtomLayoutStyle #8465 by @lucasmerlin
  • Add AtomKind::Paint #8524 by @lucasmerlin
  • StyleProvider for TextEdit and DragValue #8455 by @lucasmerlin
  • Add WidgetText::concat for joining differently styled RichTexts #8538 by @emilk
  • Add RichText::color_override to read the explicit text color #8564 by @pederbe
  • Add CollapsingHeader::custom for collapsing headers with a custom header UI #8549 by @Its-Just-Nans
  • Add MenuConfig::submenu_gap to override the hardcoded gap between a menu and its submenus #8338 by @kiwirm
  • Allow explicit popup sizing passes #8407 by @yay
  • Add Context::root_ui and Context::run_pass #8535 by @emilk
  • Add Context::set_repaint_observer #8644 by @syl20bnr
  • Add Plugin::on_exit #8527 by @lucasmerlin
  • Add Response::container_hovered, container_clicked, container_context_menu, etc #8537 by @emilk
  • Make Areas::set_state public #8645 by @syl20bnr
  • IdTypeMap: add iterator iter_temp_by_type (analogous to remove_by_type) #8672 by @the-maddin
  • Add Keys specific to Windows & Mac keyboards #8373 by @ans1ble
  • Add KeyboardShortcut::conflicts_with_text_editing #8536 by @emilk
  • Add MouseWheelSource and InputState::scroll_source() #8665 by @emilk
  • Add option scroll_zooms for mouse wheel to zoom instead of scroll inside a Scene container #7891 by @Tristan117
  • Add double-click-and-drag and triple-click-and-drag text selection #8370 by @mudbungie
  • Support AccessKit SetValue and ReplaceSelectedText in TextEdit #8701 by @Elitelord
  • Improve the fallback syntax highlighter in egui_extras #8708 by @emilk

🔧 Changed

  • Make Context::add_glyph_rasterizer idempotent #8600 by @emilk
  • Apply set_fonts/add_font right away when no font is loaded yet, or no text has been laid out this pass #8602, #8609 by @emilk
  • Name a Ui, Area, Popup or Tooltip in the accessibility tree #8607 by @emilk
  • Fail kittest tests when an input widget has no accessible name (read-only text fields are exempt) #8589, #8611 by @emilk
  • Clarify what Id to pass in accessibility_parent #8582 by @lucasmerlin
  • Bump accesskit{,_consumer,_winit} to latest versions #8496 by @alice
  • Rename Ui::id to Ui::scope_id and clarify its docstring #8542 by @emilk
  • Use Ui::unique_id for WidgetRect::parent_id #8543 by @emilk
  • Build ComboBox from atoms, and take impl IntoAtoms #8618 by @emilk
  • Round the corners of the color picker #8439 by @emilk
  • Deprecate global_theme_preference_switch in favor of global_theme_preference_buttons #8505 by @emilk
  • Feat: add more documentation on Image::texture_options #8357 by @Its-Just-Nans
  • Support the X11/Wayland PRIMARY selection #8428 by @hallyhaa
  • Make DroppedFile::web_file (and its web-sys dependency) opt-in #8669 by @DouglasDwyer
  • Keep egui::Context Send + Sync with wasm threads #8638 by @teolines
  • Enable clippy::std_instead_of_alloc in core egui crates #8702 by @emilk

🔥 Removed

  • Remove the Font borrow-bag; put its methods on FontsImpl #8504 by @emilk
  • Remove the AsId trait #8584 by @emilk

🐛 Fixed

  • Fix changing widget IDs and false-positive ID change warnings across passes #8316 by @vlansco
  • Warn again when automatic widget IDs shift between passes #8670 by @emilk
  • Ensure nested AtomLayouts have unique ids #8556 by @lucasmerlin
  • Remove unfocusable widgets from the widget cache #8653 by @ori-sky
  • Fix AccessKit ScrollIntoView for a Ui with UiBuilder::sense #8646 by @GavinPizza
  • Fix popups immediately closing on mouse button release #7624 by @vladbat00
  • Show menu without a click if another menu is open #7802 by @mkeeter
  • Respect the menu style config in sub menus #8572 by @lucasmerlin
  • Paint SubMenuButton arrow as a triangle instead of a glyph #8525 by @lucasmerlin
  • Show tooltips of container responses when hovering their children #7909 by @optozorax
  • Enable mouse wheel scrolling while dragging inside a ScrollArea #7919 by @rustbasic
  • Fix #8495: Match scrollbar interaction rect to drawn bar rect (remove dead zone) #8635 by @dajiaohuang
  • Fix scroll modifiers getting stuck when TouchPhase::End never arrives #8636 by @SulimanAbdulrazzaq
  • Fix NaN panic in Scene with zero scene_rect and unbounded zoom #8622 by @emilk
  • Fix: Panel/Scene clip rect should respect parent #8562 by @DouglasDwyer
  • Fix : an issue where double-clicks were judged as triple-clicks #7915 by @rustbasic
  • Fix TextEdit layout shift with custom margin; unclipped TextEdit grows to fit text #8628 by @emilk
  • Fix: TextFormat::valign not applied correctly with custom line_height #8030 by @rustbasic
  • Don't start a CJK row with full-width closing punctuation #8658 by @Zaneris
  • Fix DragValue reporting changes while typing with update_while_editing(false) #8627 by @SulimanAbdulrazzaq
  • Fix color picker RGB drift when editing alpha #8483 by @ishuowang
  • Preserve drop-zone frame styling when idle #8633 by @pederbe
  • Keep a Window's position after a restart #8637 by @teolines
  • Fix burst of extra repaints before request_repaint_after deadlines #8595 by @xmakro
  • Preserve safe area insets when appending input #8484 by @ishuowang

🚀 Performance

2026-09-08 23:14:58
egui

0.36.2 - `TextEdit::event_filter` and bugfixes



egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.

Try it now: https://www.egui.rs/

egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.

⭐ Added

🔧 Changed

🐛 Fixed

  • Match image file extensions case-insensitively #8430 by @emilk
  • Fix rendering of thin, angled rectangles #8482 by @emilk
  • Fix zero-duration value animations returning the previous value #8469 by @cuishuang
  • Fix panic in hit-test when a widget rect contains a NaN #8479 by @emilk
  • Properly respect min_size in TextEdit #8420 by @lucasmerlin
2026-08-07 21:22:42
egui

0.36.1 - `Sense::drag()` bugfix



egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.

Try it now: https://www.egui.rs/

egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.

  • Fix Sense::drag detecting drags when clicking widget above it #8396 by @lucasmerlin
2026-08-05 18:48:16
egui

0.36.0 - Improved mobile keyboard support



egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.

Try it now: https://www.egui.rs/

egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.

Highlights ✨

Improved mobile keyboard support

Autocomplete, autocorrect and IMEs now work correctly on iOS and android (on eframe web)!

https://github.com/user-attachments/assets/b0aa1084-0755-4e47-a0b3-0ce6890aca85

Drag to reopen panels

You can now reopen closed panels by dragging the handle:

https://github.com/user-attachments/assets/e02895c4-248e-4e22-9694-bdfcd9839bfd

Window decoration theme is now synced with app theme

Previously, when switching themes, the window chrome (OS titlebar), stayed in the OS theme. Now, it syncs with the app theme:

https://github.com/user-attachments/assets/6b393057-fdfc-431b-b997-744bc183a8ac

⭐ Added

🔧 Changed

  • Rerun sizing_pass when reopening popup #8315 by @yay
  • Update MSRV from 1.92 to 1.95 #8348 by @emilk
  • Treat a press that leaves a widget as a drag #8365 by @emilk

🔥 Removed

🐛 Fixed

  • Improve backtrace trimming for cranelift #8294 by @emilk
  • Prevent accidentally dropping TexturesDelta #8356 by @lucasmerlin
  • Make non-interactive tooltips not interactable #8362 by @lucasmerlin
  • Panels: Take separator line width into account #8367 by @emilk
  • Fix TextEdit hint text not following horizontal_align/vertical_align #8332 by @thedavidweng
  • Fix ScrollArea failure by handling horizontal and vertical scrolling separately in the missing place #8275 by @rustbasic
  • Fix window with a Grid being widenable but not shrinkable again #8386 by @emilk
2026-06-26 02:42:10
egui

0.35.0 - Inspection, egui_mcp, classes and improved IME



egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.

Try it now: https://www.egui.rs/

egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.

Highlights

  • New egui_mcp crate based on eguis new inspection protocol
  • Set classes on your Uis to modify widget behavior based on surrounding context
  • Improved IME

Egui inspection and egui_mcp

This release includes a new inspection protocol for egui. It allows reading the accesskit tree of a running app, as well as sending events to control it. It's implemented via a new InspectionPlugin in the egui_inspection crate. Eframe includes a new inspection feature. When enabled, you can enable inspection by launching the app with EGUI_INSPECTION=1. This will cause the app to listen on port 5719.

The first inspection protocol consumer is egui_mcp. It's a mcp server that allows your agent to see and use egui apps. It can be used to have the agent use the app, reproduce bugs and verify its changes. Install it via cargo install --git https://github.com/rerun-io/kittest_inspector egui_mcp and then add it to your agent via claude mcp add egui egui-mcp.

There is also a plan of adding a general inspection gui using the same protocol, that can e.g. be used to step through kittest tests frame by frame.

Here is claude using the mcp to try some of the egui demos (sped up by a lot, claude is slow):

https://github.com/user-attachments/assets/c3dd0456-acfc-428c-8efe-f4a244c9e3ba

Classes

As part of css like styling, we've added classes to egui. You can already use them to e.g. modify widget behavior or styling based on surrounding context. Add classes to the container:

ui.scope_builder(UiBuilder::new().with_class("my_container"), |ui| {
    ...
});       

In your widget, check if we're in my_container, to e.g. change sizes or colors:

  let in_container = ui.stack().iter().any(|s| s.classes.has("my_container")); 

Today this only works for custom widgets and ui code, but the next step will be a styling system that allows you to modify built in widget styling based on these classes.

Better IME composition

IME visuals received an overhaul, they are now indicated by an underline and properly show the cursor during composition:

https://github.com/user-attachments/assets/487c7e7c-ef6d-4a86-8dbc-8c71871b4470

  • Implement proper visuals for IME composition #8083 by @umajho

⭐ Added

🔧 Changed

  • Improve IME handling, add public method owns_ime_events on Memory #7983 by @umajho
  • Use harfrust for better kerning and ligatures #8031 by @gcailly
  • Rework Window margins and set clip_rect_margin to zero #7725 by @emilk
  • Slide panels when animating them #8175 by @emilk
  • Slow down animation time from 0.1s to 0.2s #8176 by @emilk
  • Smoother CollapsingHeader animation #8177 by @emilk
  • Drag-to-scroll: now only on touch screens #8181 by @emilk
  • Window: move only by dragging title bar #8183 by @emilk
  • Rename Panel methods #8192 by @emilk
  • Panels: double-click resize edge to toggle #8193 by @emilk
  • Rename AlphaFromCoverage to FontColorTransferFunction #8201 by @emilk
  • Smoother collapsed-panel animation #8202 by @emilk
  • Improve Debug-formatting of Id in debug-builds #8190 by @emilk
  • Use strongly typed CharIndex and ByteIndex + bug fixes #8245 by @emilk
  • Allow downscaling image in GetScreenshot inspection request #8248 by @lucasmerlin
  • Announce pressed state of selectable buttons to screen readers #8130 by @antoinecellerier
  • Pre-populate font variation axes in the FontTweak UI #8258 by @emilk
  • Make font hinting target configurable via FontTweak #8262 by @emilk

🔥 Removed

🐛 Fixed

  • Don't hide whitespaces in centered and right aligned text edits #8102 by @lucasmerlin
  • Don't allow resizing past minimum content size #8152 by @lucasmerlin
  • Fix resizing of Grid #8170 by @lucasmerlin
  • Fix glyph caching on font variations #8189 by @emilk
  • Panel: never overflow available width, nor max_width #8198 by @emilk
  • Fixes color picker hue drift at low alpha values #8208 by @aedm
  • Fix: ScrollArea layout jitter with floating bars and zoom levels #7944 by @rustbasic
  • Fix #2142 - lost_focus not firing after a mid-frame focus transfer #8210 by @ufoscout
  • Fix label selection in deferred viewports #8242 by @yay
2026-05-27 16:12:20
egui

0.34.3: wgpu surface lifecycle fixes



egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.

Try it now: https://www.egui.rs/

egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.

⭐ Added

  • Add winit window access to eframe::Frame and CreationContext #8205 by @emilk

🐛 Fixed

  • Fix random hangs by improving wgpu::Surface lifecycle handling #8171 by @grtlr
  • Fix ScrollArea::scroll_to_* calls when stick_to_bottom is Active #8033 by @AmmarAbouZor

🔧 Changed

2026-05-04 22:42:40
egui

0.34.2: Text layout and selection fixes



egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.

Try it now: https://www.egui.rs/

egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.

⭐ Added

  • Add regression test for O(n²) word boundary scan #8077 by @hallyhaa

🐛 Fixed

  • Fix wrong color of last glyph of selected text #8075 by @emilk
  • Fix text selection of centered and right-aligned text #8076 by @emilk
  • Fix Context::is_pointer_over_egui and Context::egui_wants_pointer_input #8081 by @emilk
  • Fix centered & right aligned TextEdit #8082 by @lucasmerlin

🚀 Performance

  • Optimize text selection performance for large documents #7917 by @rustbasic
2026-03-27 18:26:44
egui

0.34.1: Enable WebGL fallback in eframe



egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.

Try it now: https://www.egui.rs/

egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.

eframe 0.34.1 changelog

2026-03-26 19:07:03
egui

0.34.0: More `Ui`, less `Context`



(yes, we have a logo now!)

egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.

Try it now: https://www.egui.rs/

egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.

egui 0.34.0 changelog

Highlights from this release

  • Sharper text unlocked by switching font rendering crate to skrifa
  • Fade out edges of ScrollAreas
  • Use Ui as the main entrypoint

Skrifa and font hinting

The font rendering backend was switched from ab_glyph to skrifa + vello_cpu. This enabled us support font hinting and variations. It also paves the way for more font improvements in the future, like support for color emojis and adding helpers for variations like RichText::bold.

Font hinting makes text more clear (look at the =):

https://github.com/user-attachments/assets/ea9151ec-869f-4c05-ab59-836114683417

We now support setting variable font parameters:

https://github.com/user-attachments/assets/0febde1c-ebf6-4d85-8f96-86ec0f934ecf

(Unfortunately there is currently a bug with variations, meaning changing them live like this won't work in practise. There is a draft PR to fix it, but it didn't make the release)

More Ui, less Context

egui has long had a confusing overlap in responsibilities between Context and Ui. In particular, you could add panels to either one (or both!). In this release, we switch from having Context be the main entrypoint, and instead provide whole-app Ui. In egui we've replaced Context::run with Context::run_ui, and changed viewports to be given a &mut Ui instead of Context. In eframe we've deprecated App::update replaced it with App::ui (which provides a &mut Ui instead of a &Context).

In addition to this, Ui now derefs to Context, so all code like ui.ctx().input(…) can now be written ui.input(…). This means you are much less likely to have to use naked Contexts. Context can still be useful though, since they implement Clone and can be sent to other threads so you can call .request_repaint on them.

  • Add Context::run_ui #7736 by @emilk
  • Add Deref<Target = Context> for Ui #7770 by @emilk
  • Replace App::update with fn logic and fn ui #7775 by @emilk
  • Rename Context::style to global_style; avoid confusion w/ Ui::style #7772 by @emilk
  • Rename functions in Context to avoid confusion #7773 by @emilk
  • Viewports: give the caller a Ui instead of Context #7779 by @emilk

Changed panel API

As part of the above work, we have unified the panel API. SidePanel and TopBottomPanel are deprecated, replaced by a single Panel. Furthermore, it is now deprecated to use panels directly on Context. Use the show_inside functions instead, acting on Uis.

This unification and simplification will make it easier to maintain and improve panels going forward.

  • Add Panel to replace SidePanel and TopBottomPanel #5659 by @sharky98
  • Deprecate using Panel directly on a Context #7781 by @emilk
  • Deprecate CentralPanel::show #7783 by @emilk
  • Deprecate Context::used_size and Context::available_rect #7788 by @emilk

⭐ Added

🔧 Changed

  • Remove accesskit feature and always depend on accesskit #7701 by @emilk
  • Update MSRV from 1.88 to 1.92 #7793 by @JasperBRiedel
  • Improve modifier handling when scrolling #7678 by @emilk
  • Apply preferred font weight when loading variable fonts #7790 by @pmnxis
  • Make scroll bars and resize splitters visible to accesskit #7804 by @emilk
  • Allow moving existing widgets to the top of interaction stack #7805 by @emilk
  • Slightly change interact behavior around thin splitters #7806 by @emilk
  • Move window resize interaction to be over contents #7807 by @emilk
  • Don't expand widgets on hover #7808 by @emilk
  • Make FrameCache::get return a reference instead of cloning the cached value #7834 by @KonaeAkira
  • Update selected dependencies #7920 by @oscargus
  • Make Galley::pos_from_layout_cursor pub #7864 by @dionb
  • Update accesskit to 0.24.0 (and related deps) #7850 by @delan
  • Quit on Ctrl-Q #7985 by @emilk
  • Fade out the edges of ScrollAreas #8018 by @emilk

🔥 Removed

🐛 Fixed

  • Fix: ensure CentralPanel::show_inside allocates space in parent #7778 by @emilk
  • Heed constrain rect when auto-positioning windows #7786 by @emilk
  • Fix jitter when hovering edge of scroll area close to resize splitter #7803 by @emilk
  • Don't focus Areas, Windows and ScrollAreas #7827 by @lucasmerlin
  • Fix backspacing leaving last character in IME prediction not removed on macOS native and Safari #7810 by @umajho
  • Implemented distance threshold for double/triple clicks #7817 by @bl4ze4447
  • Fix CentralPanel::show_inside_dyn to round panel_rect #7868 by @ripopov
  • Stop ctrl+arrow etc from moving focus #7897 by @emilk
  • Fix scroll area not consuming scroll events #7904 by @lucasmerlin
  • Pass in an explicit id in UiBuilder, to avoid wrapping passed in ids with Id::new() #7925 by @lucasmerlin
  • Fix crash when dragging a DragValue through small floats #7939 by @Fyrecean
  • Fix emoji icon font #7940 by @Jhynjhiruu
  • Fixes the overly aggressive overflow elision in truncate() and similar for os scaling other than 100% #7867 by @RndUsr123
  • Fix text color when selecting newline character #7951 by @emilk
  • Fix: repaint on drag-and-drop files #7953 by @emilk
  • Fix instable IDs following animated panels #7994 by @emilk
  • Enables every combination of TextEdit and LayoutJob alignments #7831 by @RndUsr123
  • Fix horizontal_wrapping row height after using text_edit_multiline #8000 by @optozorax
  • Fix menu keyboard toggle for open submenus #7957 by @fjkorf
  • Fix: Visuals::interact_cursor support in Button #7986 by @mango766

🚀 Performance

  • Shrink the byte-size of Response slightly #8011 by @emilk
2025-12-11 22:40:37
egui

0.33.3 - Improve kittest and text selection

egui is an easy-to-use immediate mode GUI for Rust that runs on both web and native.

Try it now: https://www.egui.rs/

egui development is sponsored by Rerun, a startup building an SDK for visualizing streams of multimodal data.

egui

  • Treat . as a word-splitter in text navigation #7741 by @emilk
  • Change text color of selected text #7691 by @emilk

egui_kittest changelog

egui_extras changelog