Text
rust
pub fn text(args: impl Into<TextArgs>)
The text
component is used to display textual content.
Arguments
args: impl Into<TextArgs>
This argument configures the style of the
text
component, including content, font size, color, alignment, and other properties. You can build it viaTextArgsBuilder
.Note that since
Into<TextArgs>
is implemented for types likestr
andString
, you can use the shorthandtext("Hello, World!")
.