Widget Properties
widget
These properties apply to all widgets, and can be used anywhere!
Properties
class:stringcss class namevalign:stringhow to align this vertically. possible values: "fill", "baseline", "center", "start", "end"halign:stringhow to align this horizontally. possible values: "fill", "baseline", "center", "start", "end"vexpand:boolshould this container expand vertically. Default: falsehexpand:boolshould this widget expand horizontally. Default: falsewidth:intwidth of this elementheight:intheight of this elementactive:boolIf this widget can be interacted withtooltip:stringtooltip text (on hover)visible:boolvisibility of the widgetstyle:stringinline scss style applied to the widgetcss:stringscss code applied to the widget
combo_box_text
Properties
items:vecItems displayed in the combo boxtimeout:durationtimeout of the command. Default: "200ms"onchange:stringruns when an item is selected, replacing{}with the item
expander
Properties
name:stringname of the expanderexpanded:boolsets whether it's expanded
revealer
Properties
transition:stringanimation name ("slideright", "slideleft", etc.)reveal:boolwhether the child is revealedduration:durationhow long the transition lasts. Default: "500ms"
checkbox
Properties
checked:boolinitial checked statetimeout:durationcommand timeout. Default: "200ms"onchecked:stringcommand when checkedonunchecked:stringcommand when unchecked
color_button
Properties
use_alpha:booluse alpha channelonchange:stringcommand on color selecttimeout:durationDefault: "200ms"
color_chooser
Properties
use_alpha:booluse alpha channelonchange:stringcommand on color selecttimeout:durationDefault: "200ms"
slider
Properties
flipped:boolreverse directionmarks:stringdraw marksdraw_value:boolshow valuevalue_pos:stringwhere to show value ("left", "right", etc.)round_digits:intnumber of decimal placesvalue:floatcurrent valuemin:floatminimum valuemax:floatmaximum valuetimeout:durationDefault: "200ms"onchange:stringcommand on change (use{}for value)orientation:stringlayout direction
progress
Properties
flipped:boolreverse directionvalue:floatprogress (0–100)orientation:stringlayout direction
input
Properties
value:stringset current textonchange:stringcommand on change (use{}for value)timeout:durationDefault: "200ms"onaccept:stringcommand on Enter (use{}for value)password:boolobscure input
button
Properties
timeout:durationDefault: "200ms"onclick:stringcommand on activationonmiddleclick:stringcommand on middle clickonrightclick:stringcommand on right click
image
Properties
path:stringimage file pathimage_width:intimage widthimage_height:intimage heightpreserve_aspect_ratio:boolkeep aspect ratiofill_svg:stringfill color for SVGsicon:stringtheme icon nameicon_size:stringsize of the icon
box
Properties
spacing:intspacing between childrenorientation:stringdirection of childrenspace_evenly:booldistribute children evenly
overlay
Properties
None
tooltip
Properties
None listed
centerbox
Properties
orientation:stringdirection of layout
scroll
Properties
hscroll:boolallow horizontal scrollingvscroll:boolallow vertical scrollingpropagate_natural_height:booluse the natural height if true
eventbox
Properties
timeout:durationDefault: "200ms"onscroll:stringcommand on scroll ({}becomes direction)onhover:stringcommand on hoveronhoverlost:stringcommand on hover exitcursor:stringcursor typeondropped:stringcommand on drop ({}is URI)dragvalue:stringURI to drag from this widgetdragtype:stringtype to drag ("file", "text")onclick:stringcommand on clickonmiddleclick:stringcommand on middle clickonrightclick:stringcommand on right click
label
Properties
text:stringtext to displaytruncate:booltruncate textlimit_width:intmax characters to showtruncate_left:booltruncate beginningshow_truncated:boolshow truncationunindent:boolstrip leading spacesmarkup:stringPango markupwrap:boolwrap textangle:floatrotation anglegravity:stringtext gravityxalign:floathorizontal alignmentyalign:floatvertical alignmentjustify:stringtext justificationwrap_mode:stringwrap mode ("word", "char", etc.)lines:intmax lines (−1 = unlimited)
calendar
Properties
day:floatselected daymonth:floatselected monthyear:floatselected yearshow_details:boolshow detailsshow_heading:boolshow headingshow_day_names:boolshow day namesshow_week_numbers:boolshow week numbersonclick:stringcommand with{0},{1},{2}for day/month/yeartimeout:durationDefault: "200ms"
stack
Properties
selected:intchild indextransition:stringanimation namesame_size:boolequal child size
transform
Properties
rotate:floatrotation angletransform_origin_x:stringtransform origin xtransform_origin_y:stringtransform origin ytranslate_x:stringshift xtranslate_y:stringshift yscale-x:stringscale xscale-y:stringscale y
circular-progress
Properties
value:float0–100 progressstart_at:floatstart percentagethickness:floatline thicknessclockwise:booldirection
graph
Properties
value:floatcurrent valuethickness:floatline thicknesstime_range:durationduration to trackmin:floatminimum valuemax:floatmaximum value