Skip to main content

ui_text_input

Function ui_text_input 

Source
pub fn ui_text_input(
    id: u32,
    x: f32,
    y: f32,
    w: f32,
    placeholder: &str,
) -> String
Expand description

Render a single-line text input. Returns the current text content.

placeholder is the muted hint shown when the field is empty. The text content persists across frames; use ui_text_input_with_value to seed an initial value the first time this id is seen.

Supports caret movement (←/→/Home/End), selection (Shift+arrows), copy/cut/paste (Cmd/Ctrl+C/X/V), and select-all (Cmd/Ctrl+A).