Newer Version Available

This content describes an older version of this product. View Latest

BarcodeScanner Example–Modern Scanning API

Here’s a complete example of a Lightning web component that uses BarcodeScanner to scan multiple barcodes simultaneously and process them in a batch after scanning is completed.

The HTML template provides a minimal scanning user interface. There’s an element to display the results of the scans in a list view, a bit of static help text, and a button to start scanning.

This example displays all the values of successful scans in a list view. It’s a streamlined example, emphasizing the scanning lifecycle of the modern scanning APIs.