Skip to main content

text_input

Function text_input 

Source
pub fn text_input<M: 'static>(
    placeholder: impl Into<String>,
    value: impl Into<String>,
    on_input: impl Fn(String) -> M + 'static,
) -> Node<M>
Expand description

A field to type into, showing value. Sends on_input with the new text on every change. It takes the focus when it appears, and while it has it, keys stay in the popover; Esc still closes it. on_submit is sent on Enter. One per popover page. A Tone::Critical tone marks it as wrong.