12 releases (7 major breaking)

7.0.0 Jul 22, 2024
6.0.1 Jun 8, 2024
6.0.0 Mar 30, 2024
5.0.0 Feb 11, 2024
0.1.1 Jul 19, 2023

#390 in GUI

Download history 2/week @ 2024-07-03 2/week @ 2024-07-10 119/week @ 2024-07-17 59/week @ 2024-07-24 47/week @ 2024-07-31 2/week @ 2024-08-14 10/week @ 2024-08-21 13/week @ 2024-08-28 21/week @ 2024-09-04 33/week @ 2024-09-11 14/week @ 2024-09-18 14/week @ 2024-09-25 7/week @ 2024-10-02 31/week @ 2024-10-09 18/week @ 2024-10-16

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

MIT license

17KB
281 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

~7–25MB
~408K SLoC