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

#215 in GUI

Download history 15/week @ 2024-08-26 14/week @ 2024-09-02 34/week @ 2024-09-09 12/week @ 2024-09-16 21/week @ 2024-09-23 6/week @ 2024-09-30 17/week @ 2024-10-07 35/week @ 2024-10-14 1/week @ 2024-10-21 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 149/week @ 2024-12-09

305 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