Miss any of our Open RFC calls?Watch the recordings here! »


4.0.0 • Public • Published

Scandit Barcode Scanner SDK for the Web - React Component

React component for the Scandit WebSDK.

Enterprise barcode scanning performance in your browser via JavaScript and WebAssembly.

Made by Scandit

Access cameras available on the devices for video input, display a barcode picker interface, configure in-depth settings for barcode symbologies and performance, and let users easily scan barcodes in your web application.

To use this library you must possess a valid Scandit account and license key. You can register for a free trial here.

Table of Contents:

React project integration

Install the Scandit WebSDK

Run npm install scandit-sdk --save to install the WebSDK library and save it to your dependencies.

Add the component to your project

In the component where you want to use it, add the ScanditBarcodeScanner component to your app:

  • import the needed parts:

    import ScanditBarcodeScanner from "scandit-sdk-react";
  • import optional parts from the main Scandit WebSDK if needed:

    import {
    } from "scandit-sdk";

Use the component in your project

Add the component to your render function:

  // Library licensing & configuration options (see https://docs.scandit.com/stable/web/globals.html#configure)
  engineLocation="https://cdn.jsdelivr.net/npm/scandit-sdk@5.x/build" // could also be a local foldere.g"build"
  // Picker events
  onReady={() => this.setState({ scannerReady: true })}
  // Picker options

For the above example you also need in your component the following (example), to retrieve the scan settings:

getScanSettings = () => {
  return new ScanSettings({ enabledSymbologies: [Barcode.Symbology.CODE128] });

For a fully customized picker, see the example below:

    ⚠️ Make sure to keep accessCamera and paused synchronized in a sensible wayas resuming scanning accesses
    the cameraso your state might become outdated.
    For exampleset accessCamera to true whenever scanning is resumed.
  laserArea={{ x: 0, y: 0, width: 1, height: 1 }}
  viewfinderArea={{ x: 0, y: 0, width: 1, height: 1 }}
  // only set on component creationcan not be changed afterwards

For the above example you also need in your component the following (example), to retrieve the single image mode settings:

getSingleImageModeSettings = () => {
  return {
    desktop: {
      usageStrategy: SingleImageModeSettings.UsageStrategy.FALLBACK,
    mobile: {
      usageStrategy: SingleImageModeSettings.UsageStrategy.FALLBACK,


This component has been made to follow the BarcodePicker creation parameters and methods available in the main Scandit WebSDK library. In addition to that it also integrates the parameters for its configuration. Please refer to the demo application code, WebSDK BarcodePicker documentation and WebSDK configuration documentation for available options and details.

Breaking changes


  • The component's singleImageMode attribute is now replaced by singleImageModeSettings, accepting a newly structured settings object.
  • The component's onScannerInitialized and scanner attributes are not available anymore, optimal performance regarding reuse of internal parts is now automatically handled by the library as part of the component's lifecycle.


For questions or support please use the form you can find here or send us an email to support@scandit.com.


This project is licensed under the Apache License, Version 2.0.

React component development

In case you want to work and modify the component itself.


  • Running npm install in the component's root directory will install everything you need for development.

Demo Development Server

  • npm start will run a development server with the component's demo app at http://localhost:3000 with hot module reloading.


  • npm run build will build the component and also bundle the demo app.
  • npm run clean will delete built resources.


npm i scandit-sdk-react

DownloadsWeekly Downloads






Unpacked Size

2.49 MB

Total Files




Last publish


  • avatar
  • avatar
  • avatar