Text edit
A multi-line text editor.
autofocus focuses it when it mounts; focus_when focuses it each time the signal changes. caret_rect receives the caret rectangle, relative to the editor's box, each time the caret moves, and None while the editor is disabled, so a popup can follow the caret.
GUITUIRuns in the browser
text_editPreview




















Usage example
fn text_edit_demo() -> TextEditBuilder { text_edit(signal(String::from("Multi-line\neditable text."))).height(96.0) }fn text_edit_demo() -> TextEditBuilder { text_edit(signal(String::from( "Multi-line\neditable text.", ))) .height(96.0)}States

Default
Hover
Pressed
Focused
Disabled
API
| Name | Signature | Purpose |
|---|---|---|
text_edit | `fn text_edit(value: Signal<String>) -> TextEditBuilder`; `.autofocus()`, `.focus_when(Signal<u64>)`, `.caret_rect(Signal<Option<Rect>>)` | A multi-line text editor. autofocus focuses it when it mounts; focus_when focuses it each time the signal changes. caret_rect receives the caret rectangle, relative to the editor's box, each time the caret moves, and None while the editor is disabled, so a popup can follow the caret. |