Speed up Smart Label Capture integration with Agent Skills
Install the official skill to help your coding agent (Claude Code, Codex, Cursor, etc.) integrate, debug, and customize Smart Label Capture on Cordova following Scandit's recommended patterns. More info →
Run this in a terminal in your project directory, then follow the instructions to select your coding agent.
npx skills add https://github.com/scandit/skills --skill label-capture-cordovaYour coding agent loads the skill automatically based on your prompt; to invoke it explicitly, call /label-capture-cordova followed by your task.
Label Definitions
A Label Definition is a configuration that defines the label, and its relevant fields, that Smart Label Capture should recognize and extract during scans.
Smart Label Capture provides a Label Definition API, enabling you to configure and extract structured data from predefined and custom labels. This feature provides a flexible way to recognize and decode fields within a specific label layout such as price tags, VIN labels, or packaging stickers without needing to write custom code for each label type.
There are two approaches to using label definitions:
Pre-built Labels
Smart Label Capture includes ready-made label definitions for common use cases. These pre-built options let you recognize and extract information from standard label types without creating custom configurations:
Example: Price label
Use LabelDefinition.createPriceCaptureDefinition() to create a pre-built label definition for price labels, such as those found in retail environments:

import { LabelCaptureSettings, LabelDefinition } from "scandit-cordova-datacapture-label";
// Create a pre-built price capture label definition.
const priceLabel = LabelDefinition.createPriceCaptureDefinition("price-label");
// Create the label capture settings from the label definition.
const settings = LabelCaptureSettings.settingsFromLabelDefinitions([priceLabel], null);
Custom Labels
If Smart Label Capture's pre-built options don't fit your needs, define a custom label instead. Custom labels can combine your own fields with any of the available pre-built ones.
The following characters are recognized: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ()-./:,$¶".
Custom Fields
There are two types of custom fields you can define:
The following properties are available to configure custom fields:
| Property | Required | Description |
|---|---|---|
valueRegexes | Yes | The regex patterns that identify the target string in the scanned content. |
anchorRegexes | No | Used to specify keywords or phrases that help identify the context of the field. This is particularly useful when the label contains multiple fields that could match the same pattern (e.g., when both packaging and expiry dates are present). |
symbologies | Yes (barcode fields) | The barcode symbologies to match for barcode fields. This is important for ensuring that the field only captures data from specific barcode types, enhancing accuracy and relevance. |
optional | No | Whether the field is optional or mandatory. This is helpful when certain fields may not be present on every scan. |