Expand description
TextInput — styled single-line text field composite.
Wraps the TextInputField
editing primitive in a bordered, padded frame with placeholder
overlay, validation, optional clear button, and leading/trailing
slots. All actual text editing is delegated to the field: every
configuration method here has a direct counterpart on the
primitive.
Most applications want TextInput. Choose
TextInputField directly
when you’re building a composite of your own that already
supplies its frame — SpinBox is the canonical in-tree example.
§Example
ⓘ
let search = ctx.signal(String::new());
TextInput::new(search.clone())
.placeholder("Search...")
.show_clear_button(true)
.leading_slot(IconWidget::from_svg(SEARCH_ICON))
.on_submit_fn(|ctx| ctx.send_intent(AppIntent::Search))Structs§
- Text
Input - Styled single-line text input composite.
Enums§
- Text
Input Variant - Validation
State - Validation state for the text input field.