15 releases (9 major breaking)

9.0.0 Jan 25, 2025
8.0.0 Nov 7, 2024
7.1.0 Nov 7, 2024
7.0.0 Jul 22, 2024
0.1.1 Jul 19, 2023

#292 in GUI

Download history 14/week @ 2024-10-28 265/week @ 2024-11-04 39/week @ 2024-11-11 64/week @ 2024-11-18 19/week @ 2024-11-25 69/week @ 2024-12-02 106/week @ 2024-12-09 69/week @ 2024-12-16 34/week @ 2024-12-30 50/week @ 2025-01-06 146/week @ 2025-01-13 102/week @ 2025-01-20 43/week @ 2025-01-27 46/week @ 2025-02-03 77/week @ 2025-02-10

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

MIT license

18KB
282 lines

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


lib.rs:

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,
    ));
  }
}

Dependencies

~4.5–9.5MB
~92K SLoC