Skip to content

2D Scanner

The 2D Scanner is an icon button-type component that activates the camera and scans a 2D code to perform an action. The behavior changes as follows depending on the click event settings.

Click Event2D Scanner click behavior
NoneDoes nothing.
URL- The camera is activated to read the 2D code. (To cancel, click the X in the upper left corner of the camera.)
- The two-dimensional code is read with the camera.
- When the 2D code is recognized, a link surrounded by a white frame is displayed at the bottom.
- Tap the link to go to the site of the 2D code.
Action- The camera is activated to read the 2D code. (To cancel, click the X in the upper left corner of the camera.)
- Read the 2D Code with a camera.
- Action is performed. In the action, $ui.2dcode_id.value can be used to obtain the value of the 2D Code that was read.

Properties

NoItemInput ValueDefault ValueAction PropertyTypeAction Default ValueDescription
1IDStringAuto-generatedidstringAuto-generatedThe [id] property cannot be set by action.
2WidthNumber40widthnumber40Width of the component
3HeightNumber40heightnumber40Height of the component
4XNumberxnumberX coordinate position
5YNumberynumberY coordinate position
6LockBooleanOFFlockbooleanfalseWhen 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.
7ColorString
Color Picker
colorstringColor setting of the component
8DisabledBooleanOFFdisabledbooleanfalseDisabled state of the component
9VisibilityBooleanONvisibilitybooleantrueVisibility state of the component
10TooltipStringtooltipstringTooltip text displayed on hover
11Click EventSelection
1. None
2. URL
3. Action
4. Detached Action
Click behavior
Detached Action became selectable in v4.1.0.
12Detached ActionSelection
1. [Detached Action ID]
detachedActionstringSet a detached action
Added in v4.1.0.
13ValuevaluestringThe [value] property cannot be set by action.

Event

Event nameDescription
onclickClicking activates the camera to scan the 2D code. Scanning a 2D code with the camera triggers the event.