18 releases (10 major breaking)

new 10.2.0 May 3, 2025
9.0.0 Jan 25, 2025
8.0.0 Nov 7, 2024
7.1.0 Nov 7, 2024
0.1.1 Jul 19, 2023

#259 in GUI

Download history 146/week @ 2025-01-13 102/week @ 2025-01-20 43/week @ 2025-01-27 37/week @ 2025-02-03 113/week @ 2025-02-10 426/week @ 2025-02-17 508/week @ 2025-02-24 122/week @ 2025-03-03 364/week @ 2025-03-10 38/week @ 2025-03-17 9/week @ 2025-03-24 18/week @ 2025-03-31 12/week @ 2025-04-07 21/week @ 2025-04-14 8/week @ 2025-04-21 256/week @ 2025-04-28

299 downloads per month
Used in 2 crates (via hydrate-editor)

MIT license

21KB
350 lines

Example

use egui_autocomplete::AutoCompleteTextEdit;
struct AutoCompleteExample {
  // User entered text
  text: String,
  // A list of strings to search for completions
  inputs: Vec<String>,
}

impl AutoCompleteExample {
  fn update(&mut self, _ctx: &egui::Context, ui: &mut egui::Ui) {
    ui.add(AutoCompleteTextEdit::new(
       &mut self.text,
       &self.inputs,
    ));
  }
}

Crates.io Documentation codecov Dependency status

egui_autocomplete

An extension to the egui::TextEdit that allows for a dropdown box with autocomplete to popup while typing.
You can select the suggestions with arrows keys + enter/tab or mouse clicks.

View web example here

To enable egui persistence, enable the serde feature

Dependencies

~4.5–10MB
~95K SLoC