Widget Properties
widget
These properties apply to all widgets, and can be used anywhere!
Properties
class
:string
css class namevalign
:string
how to align this vertically. possible values: "fill", "baseline", "center", "start", "end"halign
:string
how to align this horizontally. possible values: "fill", "baseline", "center", "start", "end"vexpand
:bool
should this container expand vertically. Default: falsehexpand
:bool
should this widget expand horizontally. Default: falsewidth
:int
width of this elementheight
:int
height of this elementactive
:bool
If this widget can be interacted withtooltip
:string
tooltip text (on hover)visible
:bool
visibility of the widgetstyle
:string
inline scss style applied to the widgetcss
:string
scss code applied to the widget
combo-box-text
Properties
items
:vec
Items displayed in the combo boxtimeout
:duration
timeout of the command. Default: "200ms"onchange
:string
runs when an item is selected, replacing{}
with the item
expander
Properties
name
:string
name of the expanderexpanded
:bool
sets whether it's expanded
revealer
Properties
transition
:string
animation name ("slideright", "slideleft", etc.)reveal
:bool
whether the child is revealedduration
:duration
how long the transition lasts. Default: "500ms"
checkbox
Properties
checked
:bool
initial checked statetimeout
:duration
command timeout. Default: "200ms"onchecked
:string
command when checkedonunchecked
:string
command when unchecked
color-button
Properties
use-alpha
:bool
use alpha channelonchange
:string
command on color selecttimeout
:duration
Default: "200ms"
color-chooser
Properties
use-alpha
:bool
use alpha channelonchange
:string
command on color selecttimeout
:duration
Default: "200ms"
slider
Properties
flipped
:bool
reverse directionmarks
:string
draw marksdraw-value
:bool
show valuevalue-pos
:string
where to show value ("left", "right", etc.)round-digits
:int
number of decimal placesvalue
:float
current valuemin
:float
minimum valuemax
:float
maximum valuetimeout
:duration
Default: "200ms"onchange
:string
command on change (use{}
for value)orientation
:string
layout direction
progress
Properties
flipped
:bool
reverse directionvalue
:float
progress (0–100)orientation
:string
layout direction
input
Properties
value
:string
current textonchange
:string
command on changetimeout
:duration
Default: "200ms"onaccept
:string
command on Enterpassword
:bool
obscure input
button
Properties
timeout
:duration
Default: "200ms"onclick
:string
command on activationonmiddleclick
:string
command on middle clickonrightclick
:string
command on right click
image
Properties
path
:string
image file pathimage-width
:int
image widthimage-height
:int
image heightpreserve-aspect-ratio
:bool
keep aspect ratiofill-svg
:string
fill color for SVGsicon
:string
theme icon nameicon-size
:string
size of the icon
box
Properties
spacing
:int
spacing between childrenorientation
:string
direction of childrenspace-evenly
:bool
distribute children evenly
overlay
Properties
None
tooltip
Properties
None listed
centerbox
Properties
orientation
:string
direction of layout
scroll
Properties
hscroll
:bool
allow horizontal scrollingvscroll
:bool
allow vertical scrolling
eventbox
Properties
timeout
:duration
Default: "200ms"onscroll
:string
command on scroll ({}
becomes direction)onhover
:string
command on hoveronhoverlost
:string
command on hover exitcursor
:string
cursor typeondropped
:string
command on drop ({}
is URI)dragvalue
:string
URI to drag from this widgetdragtype
:string
type to drag ("file", "text")onclick
:string
command on clickonmiddleclick
:string
command on middle clickonrightclick
:string
command on right click
label
Properties
text
:string
text to displaytruncate
:bool
truncate textlimit-width
:int
max characters to showtruncate-left
:bool
truncate beginningshow-truncated
:bool
show truncationunindent
:bool
strip leading spacesmarkup
:string
Pango markupwrap
:bool
wrap textangle
:float
rotation anglegravity
:string
text gravityxalign
:float
horizontal alignmentyalign
:float
vertical alignmentjustify
:string
text justificationwrap-mode
:string
wrap mode ("word", "char", etc.)lines
:int
max lines (−1 = unlimited)
literal
Properties
content
:string
raw yuck
calendar
Properties
day
:float
selected daymonth
:float
selected monthyear
:float
selected yearshow-details
:bool
show detailsshow-heading
:bool
show headingshow-day-names
:bool
show day namesshow-week-numbers
:bool
show week numbersonclick
:string
command with{0}
,{1}
,{2}
for day/month/yeartimeout
:duration
Default: "200ms"
stack
Properties
selected
:int
child indextransition
:string
animation namesame-size
:bool
equal child size
transform
Properties
rotate
:float
rotation angletransform-origin-x
:string
transform origin xtransform-origin-y
:string
transform origin ytranslate-x
:string
shift xtranslate-y
:string
shift yscale-x
:string
scale xscale-y
:string
scale y
circular-progress
Properties
value
:float
0–100 progressstart-at
:float
start percentagethickness
:float
line thicknessclockwise
:bool
direction
graph
Properties
value
:float
current valuethickness
:float
line thicknesstime-range
:duration
duration to trackmin
:float
minimum valuemax
:float
maximum value