Constant freya_elements::rect::max_lines

source ·
pub const max_lines: AttributeDescription;
Expand description

Determines the amount of lines that the text can have. It has unlimited lines by default.

§Example

fn app() -> Element {
    rsx!(
        label {
            "Hello, World! \n Hello, World! \n Hello, world!" // Will show all three lines
        }
        label {
            max_lines: "2",
            "Hello, World! \n Hello, World! \n Hello, world!" // Will only show two lines
        }
    )
}