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

#291 in GUI

Download history 30/week @ 2024-10-29 258/week @ 2024-11-05 38/week @ 2024-11-12 59/week @ 2024-11-19 28/week @ 2024-11-26 62/week @ 2024-12-03 112/week @ 2024-12-10 57/week @ 2024-12-17 36/week @ 2024-12-31 83/week @ 2025-01-07 113/week @ 2025-01-14 113/week @ 2025-01-21 38/week @ 2025-01-28 39/week @ 2025-02-04 106/week @ 2025-02-11

298 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