label
The label
component is a customizable label widget with animation and event handling capabilities. It allows hover, focus, and text styling via various properties, animations, and events.
Use the built-in dep
function
Name | Description | Type |
---|---|---|
theme | Theme | Themes |
color | Color | MakepadColor |
stroke_hover_color | Font color when hovering | MakepadColor |
stroke_focus_color | Font color when getting focus | MakepadColor |
font_size | Font size | F64 |
cursor | Mouse cursor | MouseCursor |
line_spacing | Line spacing | F64 |
height_factor | Height factor | F64 |
wrap | Text wrapping method | TextWrap |
font_family | Font type | LiveDependency |
visible | Visible or not | bool |
height | height | Size |
width | width | Size |
margin | margin | Margin |
padding | padding | Padding |
align | alignment | Align |
text | text content | String |
animation_key | whether to allow animation | bool |
event_key | whether to allow events | bool |
grabKey_focus | whether to capture key focus | bool |
Name | Description | Parameters |
---|---|---|
hover_in | mouse enter event | GLabelHoverParam |
hover_out | mouse leave event | GLabelHoverParam |
focus | get focus event | GLabelFocusParam |
focus_lost | Focus lost event | GLabelFocusLostParam |