qrcode-studio
Version:
A comprehensive Capacitor plugin for QR code and barcode scanning/generation. Supports 22+ QR data types and 14+ barcode formats (EAN, UPC, Code 128, etc.), with customizable designs, analytics, and React components. Works seamlessly across web, iOS, and
55 lines (54 loc) • 1.25 kB
TypeScript
import React from 'react';
import type { ScanResult, ScanError, ScanOptions, BarcodeFormat } from '../definitions';
export interface BarcodeScannerProps {
/**
* Callback when barcode is scanned
*/
onScan: (result: ScanResult) => void;
/**
* Callback on error
*/
onError?: (error: ScanError) => void;
/**
* Barcode formats to scan
*/
formats?: BarcodeFormat[];
/**
* Show torch/flashlight button
*/
showTorchButton?: boolean;
/**
* Show format selector
*/
showFormatSelector?: boolean;
/**
* Enable multiple barcode scanning
*/
multiple?: boolean;
/**
* Custom scan options
*/
scanOptions?: Omit<ScanOptions, 'formats' | 'multiple'>;
/**
* Custom class name
*/
className?: string;
/**
* Custom styles
*/
style?: React.CSSProperties;
/**
* Show scanning overlay
*/
showOverlay?: boolean;
/**
* Custom overlay component
*/
overlayComponent?: React.ReactNode;
/**
* Show product info for scanned barcodes
*/
showProductInfo?: boolean;
}
export declare const BarcodeScanner: React.FC<BarcodeScannerProps>;
export default BarcodeScanner;