Links
Comment on page

Barcode Scanner

The Barcode Scanner component can be used to decode scanned barcodes.

Overview

The Barcode Scanner component operates only on mobile devices using the Salesforce mobile app.
The Barcode Scanner Component allows users to scan and read barcodes using their cameras. It is often used in retail, logistics, and other applications where it is necessary to quickly and accurately capture and transmit information about a product or item.
The Barcode Scanner Component may be displayed as a static image or button that the user can tap to initiate a scan, or it may be integrated into the device's camera app. The scanned data may be displayed to the user or automatically processed and used to perform some action, such as adding an item to a cart or looking up more information about a product.
The Barcode Scanner component can read the following barcode formats, including QR Codes.
  • EAN-13
  • EAN-8
  • UPC-A
  • UPC-E
  • Code-39
  • Code-93
  • Code-128
  • QR-Code
  • Data Matrix
  • PDF-417
  • AZTEC
Overall, the Barcode Scanner Component is valuable for allowing users to quickly and easily scan physical barcodes and retrieve their information.

Changing the properties

Continuous Scanning

If true, multiple barcodes can be scanned until the user selects the cancel button or exits the scanner.

Open Onload

Specifies whether the scanner opens automatically when the component loads.

Camera Facing

Specifies whether the front- or rear-facing camera is used.

Adding Interactions

Interactions define what will happen when users interact with the Barcode scanner component. You can find a list of interactions available here.
Here are the available interactions for the Barcode Scanner component:
  • On Successful Scan: The event is fired when the user successfully scans a barcode.

Styling the Barcode Scanner

From the Styles panel, you can customize styling for the Barcode Scanner component: Margin and Button.
You can find the instructions for styling here.

Examples

Specifications

Attributes

Name
Type
Description
Barcode Types
String
Specifiy the type of barcodes to scan.
Instruction Text
String
Display instruction in the scanning interface.
Success Text
String
Text to be displayed when a barcode is successfully scanned.
Continuous Scanning
Boolean
If true, multiple barcodes can be scanned until the user selects the cancel button or exits the scanner.
Open Onload
Boolean
Specifies whether the scanner opens automatically when the component loads.
Show Success Check Mark
Boolean
Indicates whether or not a check mark is displayed upon a successful scan.
Scanner Size
String
Modifies the size of the scanner camera view. The available options represent a percentage of the user’s device screen size.
Camera Facing
String
Specifies whether the front- or rear-facing camera is used.
Present With Animation
Boolean
Determines whether the scanner animates in and out when presented and dismissed.
Label
String
The text to be displayed inside the button.
Variant
String
Change the appareance of the button.
Icon Name
String
Icon name to be displayed inside the button.
Icon Position
String
Position of the icon.
Type
String
Specifies the type of button.
Last modified 3mo ago