14 releases (8 major breaking)

8.0.0 Nov 7, 2024
7.1.0 Nov 7, 2024
7.0.0 Jul 22, 2024
6.0.1 Jun 8, 2024
0.1.1 Jul 19, 2023

#269 in GUI

Download history 20/week @ 2024-09-24 7/week @ 2024-10-01 30/week @ 2024-10-08 20/week @ 2024-10-15 2/week @ 2024-10-22 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 68/week @ 2025-01-07

173 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–9MB
~90K SLoC