Sigil

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 browsertext

Preview

Text, Default, light themeText, Default, dark theme

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

NameSignaturePurpose
textfn text(source: impl Into<TextContent>) -> TextBuilderThe 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.