Skip to content

Switch~

obj:switch

lv_switch

Property Value Default Description
val bool 0 1 = on, 0 = off
bg_color10 color 0 changes indicator color
bg_color20 color 0 changes knob color
radius20 int16 depends
on theme
changes knob corner radius (also see radius)
Example jsonl
1
{"page":1,"id":4,"obj":"switch","x":125,"y":145,"w":105,"h":55,"radius":15}

Events generated by switch are similar to the ones generate by the toggle buttons.