pub fn text(args: impl Into<TextArgs>)Expand description
§text
Renders a block of text with a single, uniform style.
§Usage
Display simple text content. For more complex styling or editing, see other components.
§Parameters
args— configures the text content and styling; seeTextArgs. Can be converted from aStringor&str.
§Examples
use tessera_ui_basic_components::text::{text, TextArgsBuilder};
use tessera_ui::{Color, Dp};
// Simple text from a string literal
text("Hello, world!");
// Styled text using the builder
text(
TextArgsBuilder::default()
.text("Styled Text")
.color(Color::new(0.2, 0.5, 0.8, 1.0))
.size(Dp(32.0))
.build()
.unwrap(),
);