Skip to main content

BasicText

Function BasicText 

Source
pub fn BasicText<S>(
    __arg0: S,
    __arg1: Modifier,
    __arg2: TextStyle,
    __arg3: TextOverflow,
    __arg4: bool,
    __arg5: usize,
    __arg6: usize,
) -> NodeId
where S: IntoTextSource + Clone + PartialEq + 'static,
Expand description

High-level element that displays text.

§When to use

Use this widget to display read-only text on the screen. For editable text, use BasicTextField.

§Arguments

  • value - The string to display. Can be a &str, String, or State<String>.
  • modifier - Modifiers to apply (e.g., padding, background, layout instructions).
  • style - Text styling (color, font size).

§Example

Text("Hello World", Modifier::padding(16.0), TextStyle::default());