Constant freya::elements::paragraph::text_overflow
pub const text_overflow: (&'static str, Option<&'static str>, bool);
Expand description
Determines how text is treated when it exceeds its max_lines
count. By default uses the clip
mode, which will cut off any overflowing text, with ellipsis
mode it will show ...
at the end.
Accepted values:
clip
(default): Simply cut the text.ellipsis
: Show…
.- `[custom-value]: Show a custom value.
§Ellipsis example
fn app() -> Element {
rsx!(
label {
max_lines: "3",
text_overflow: "ellipsis",
"Looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text"
}
)
}
§Custom value example
fn app() -> Element {
rsx!(
label {
max_lines: "3",
text_overflow: ".......too long.",
"Looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text"
}
)
}