Module freya_elements::label
source · Expand description
label simply let’s you display some text.
§Example
fn app() -> Element {
rsx!(
label {
"Hello World"
}
)
}Constants§
- The
colorattribute lets you specify the color of the text. - Specify the decoration in a text.
- Specify the decoration’s color in a text.
- Specify the decoration’s style in a text.
- With the
font_familyyou can specify what font you want to use for the inner text. - You can specify the size of the text using
font_size. - You can choose a style for a text using the
font_styleattribute. - You can choose a weight for text using the
font_weightattribute. - You can choose a width for a text using the
font_widthattribute. - Specify the width and height for the given element.
- Specify the spacing between characters of the text.
- line_height
- main_align & cross_align
- Specify the margin of an element. You can do so by four different ways, just like in CSS.
- max_width & max_height
- Determines the amount of lines that the text can have. It has unlimited lines by default.
- min_width & min_height
- Specify the opacity of an element and all its descendants.
- Specify how you want the element to be positioned inside it’s parent area.
- The
rotateattribute let’s you rotate an element. - You can change the alignment of the text using the
text_alignattribute. - Specify the text height behavior.
- Determines how text is treated when it exceeds its
max_linescount. By default uses theclipmode, which will cut off any overflowing text, withellipsismode it will show...at the end. - Specify the shadow of a text.
- Specify the spacing between words of the text.