Text field
A single-line text input.
leading and trailing place a node, such as an icon, inside the field border; the input fills the rest. clearable shows a clear button while the value is not empty; it empties the value, fires change, and puts focus back on the input.
GUITUIRuns in the browser
text_fieldPreview
























Usage example
fn text_field_demo() -> TextFieldBuilder { text_field(signal(String::from("Ada Lovelace"))).placeholder("Full name") }fn text_field_demo() -> TextFieldBuilder { text_field(signal(String::from( "Ada Lovelace", ))) .placeholder("Full name") }States

Default
Hover
Pressed
Focused
Disabled
Invalid
API
| Name | Signature | Purpose |
|---|---|---|
text_field | `fn text_field(value: Signal<String>) -> TextFieldBuilder`; `.leading(node)`, `.trailing(node)`, `.clearable()` | A single-line text input. leading and trailing place a node, such as an icon, inside the field border; the input fills the rest. clearable shows a clear button while the value is not empty; it empties the value, fires change, and puts focus back on the input. |