Skip to content

Switch

The switch is a component that accepts a boolean value (true/false).

Property

NoItemInput ValueDefault ValueAction PropertyTypeAction Default ValueDescription
1IDStringAuto-generatedidstringAuto-generatedThe [id] property cannot be set by actions.
2Label LStringSwitchlabelstringSwitchComponent label
3WidthString222widthstring222Component width
4HeightString40heightstring40Component height
5XStringxstringX coordinate position
6YStringystringY coordinate position
7LockBooleanOFFlockbooleanfalseWhen ON, the component stays fixed even when the screen is scrolled.
When OFF, the component moves along with the screen scroll.
Added in v4.1.0.
8SizeSelection
1. Small
2. Medium
3. None
MediumsizestringmediumWhen a value other than None is selected, Font Size is disabled.
Added in v4.2.0.
9Font SizeNumber16fontSizenumber16Label font size. The Thumb (circle) and Track (rail) are automatically adjusted based on the font size.
Only effective when Size is set to None.
Added in v4.2.0.
10ColorString
Color Picker
colorstringComponent color
11Background ColorString
Color Picker
backgroundColorstringBackground color
12Label ColorString
Color Picker
labelColorstringLabel color
13DisabledBooleanOFFdisabledbooleanfalseDisabled state
14Read OnlyBooleanOFFreadOnlybooleanfalseRead-only state
15VisibilityBooleanONvisibilitybooleantrueComponent show/hide
16Horizontal AlignmentSelection
1. Left
2. Center
3. Right
LefthorizontalAlignmentstringleftHorizontal alignment
17Vertical AlignmentSelection
1. Top
2. Center
3. Bottom
TopverticalAlignmentstringtopVertical alignment
18Helper TextStringhelperTextstringHelper text
19ValueSelection
1.OFF
2.ON
ONvaluebooleantrueSwitch value
20ErrorerrorbooleanfalseError state
21Change EventSelection
1. None
2. UI Script
3. Action
4. Detached Action
NoneEvent on value change
Detached Action became selectable in v4.1.0.
UI Script became selectable in v4.2.0.
22Detached ActionSelection
1. [Detached Action ID]
detachedActionstringSet a detached action
Added in v4.1.0.

Event

Event nameDescription
onchangeOccurs when a value change is made.