Text
The one text node.
source is a &str or String (static), a Signal<T: Display> (live), or a closure Fn() -> String (recomputed when the signals it reads change). .nowrap() keeps it on one line.
GUITUIRuns in the browser
textPreview




Usage example
fn text_demo() -> TextBuilder { text("Text wraps to the width of its parent and flows onto the next line.") }fn text_demo() -> TextBuilder { text( "Text wraps to the width of its parent and flows onto the next line.", )}API
| Name | Signature | Purpose |
|---|---|---|
text | fn text(source: impl Into<TextContent>) -> TextBuilder | The one text node. source is a &str or String (static), a Signal<T: Display> (live), or a closure Fn() -> String (recomputed when the signals it reads change). .nowrap() keeps it on one line. |