Speed up Barcode Capture integration with Agent Skills
Install the Scandit plugin and use the /barcode-capture-rn skill so that your AI coding agent can integrate, debug, and customize Barcode Capture on React Native following Scandit's recommended patterns. More info →
Run the following command in your project directory. It detects the supported coding agents you have installed and adds the Scandit plugin to each. Re-run it to update.
npx plugins add scandit/skillsPrefer to set it up yourself? Manual installation steps for each agent →
Choose a Viewfinder
A viewfinder shows the user where to aim the camera. By default, the Barcode Capture overlay has no viewfinder.
Examples shown on iOS.
Aimer
The central dot helps the user aim at one barcode among several on a shelf.
Rectangular
The frame shows the user where to position the barcode. You can adjust its size and choose square or rounded corners.
Laserline
The horizontal line helps the user align a barcode as they would with a handheld scanner.
Check Framework Availability
| Frameworks | Built-in viewfinders |
|---|---|
| Android, iOS, Web, Flutter, React Native, Capacitor, Cordova | Aimer, Rectangular, Laserline |
| Kotlin Multiplatform, Titanium, .NET for iOS, .NET for Android | Aimer, Rectangular |
| Linux (C API) | None. Your application provides the scanning UI. |
Restrict the Scan Area
The viewfinder guides the user in the camera preview. To restrict the scan area, configure location selection.
For the Aimer, use radius location selection. Barcode Capture can return any barcode that intersects the circle around the point of interest. For a rectangular viewfinder, use rectangular location selection with the same dimensions as the frame.
See Radius Location Selection and Rectangular Location Selection for configuration options.
Add an Aimer to the Overlay
After creating the overlay in Get Started, assign an Aimer to it.
import { AimerViewfinder } from 'scandit-react-native-datacapture-core';
overlay.viewfinder = new AimerViewfinder();
See the Viewfinder API reference for the available types and their settings.