Skip to main content

text_input

Function text_input 

Source
pub fn text_input(ui: &mut Ui<'_>, label: &str, initial: &str) -> Key
Expand description

Single-line text input with chrome (background, focus ring). Read the value with ui.edit_text(key); “changed”/“submit” events arrive in on_event with this key. The label is the key and the accessible name both ("search", "name"), so a screen reader has something to announce; use ui.text_edit with NodeSpec::label when they differ.