Gathering detailed insights and metrics for @yudiel/react-qr-scanner
Gathering detailed insights and metrics for @yudiel/react-qr-scanner
Gathering detailed insights and metrics for @yudiel/react-qr-scanner
Gathering detailed insights and metrics for @yudiel/react-qr-scanner
npm install @yudiel/react-qr-scanner
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
258 Stars
178 Commits
42 Forks
4 Watching
4 Branches
6 Contributors
Updated on 28 Nov 2024
Minified
Minified + Gzipped
TypeScript (97.97%)
JavaScript (2.03%)
Cumulative downloads
Total Downloads
Last day
-22.7%
5,402
Compared to previous day
Last week
-8%
30,385
Compared to previous week
Last month
7.3%
133,253
Compared to previous month
Last year
672.8%
789,623
Compared to previous year
2
17
Checkout the Demo.
yarn add @yudiel/react-qr-scanner
npm install @yudiel/react-qr-scanner
1import { Scanner } from '@yudiel/react-qr-scanner'; 2 3const App = () => { 4 return <Scanner onScan={(result) => console.log(result)} />; 5};
useDevices
.1D Barcodes | 2D Barcodes |
---|---|
Codabar | Aztec |
Code 39 | Data Matrix |
Code 93 | Matrix Codes |
Code 128 | Maxi Code |
Databar | Micro QR Code |
Databar Expanded | PDF 417 |
Dx Film Edge | QR Code |
EAN 8 | rMQR Code |
EAN 13 | |
ITF | |
Linear Codes | |
UPC A | |
UPC E |
Prop | Type | Required | Description |
---|---|---|---|
onScan | (detectedCodes: IDetectedBarcode[]) => void | Yes | Callback function that is called when one or more barcodes are detected. |
onError | (error: unknown) => void | No | Callback function that is called when an error occurs while mounting the camera. |
constraints | MediaTrackConstraints | No | Optional media track constraints to apply to the video stream. |
formats | BarcodeFormat[] | No | List of barcode formats to detect. |
paused | boolean | No | If true , scanning is paused. |
children | ReactNode | No | Optional children to render inside the scanner component. |
components | IScannerComponents | No | Custom components to use within the scanner. |
styles | IScannerStyles | No | Custom styles to apply to the scanner and its elements. |
classNames | IScannerClassNames | No | Custom classNames to apply to the scanner and its elements. |
allowMultiple | boolean | No | If true , ignore same barcode being scanned. |
scanDelay | number | No | Delay in milliseconds between scans. |
BarcodeFormat
1'aztec' | 2 'code_128' | 3 'code_39' | 4 'code_93' | 5 'codabar' | 6 'databar' | 7 'databar_expanded' | 8 'data_matrix' | 9 'dx_film_edge' | 10 'ean_13' | 11 'ean_8' | 12 'itf' | 13 'maxi_code' | 14 'micro_qr_code' | 15 'pdf417' | 16 'qr_code' | 17 'rm_qr_code' | 18 'upc_a' | 19 'upc_e' | 20 'linear_codes' | 21 'matrix_codes' | 22 'unknown';
IDetectedBarcode
1export interface IDetectedBarcode { 2 boundingBox: IBoundingBox; 3 cornerPoints: IPoint[]; 4 format: string; 5 rawValue: string; 6}
IScannerComponents
1export interface IScannerComponents { 2 tracker?: TrackFunction; 3 audio?: boolean; 4 onOff?: boolean; 5 torch?: boolean; 6 zoom?: boolean; 7 finder?: boolean; 8}
IScannerStyles
1export interface IScannerStyles { 2 container?: CSSProperties; 3 video?: CSSProperties; 4 finderBorder?: number; 5}
No vulnerabilities found.
No security vulnerabilities found.