Scanner
A scanner to capture barcodes using a connected camera or webcam. It supports scan event handlers, skipping duplicates, single or continuous scanning, and programmatic control of pausing/resuming.
Properties
Available properties for Scanner with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read information about components.
The internal ID of the camera used for scanning.
A list of values scanned by the barcode.
Whether the component is visible.
Whether to ignore duplicate values when capturing multiple barcodes.
Whether the component takes up space on the canvas if hidden
is true
.
The amount of margin to render outside of the component.
Whether the scanner is currently paused.
Whether the component remains visible in the editor if hidden
is true
.
Whether to pause the scanner after each scan.
The time in milliseconds between scans.
Events
Events are triggered by user interactions with Scanner. Use event handling to trigger queries or other actions in response to events.
A user scans a barcode.
Methods
Methods for interacting with Scanner. You can write JavaScript almost anywhere in Retool and use methods to manipulate data or components.
Scrolls the canvas or parent container so that the selected component appears in the visible area.
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
Clear the current value of data
.
Resume scanning.
Pause scanning.
Set singleScan
to the provided boolean value.
Set ignoreDuplicates
to the provided boolean value.
Set timeBetweenScans
to the provided number value.