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
Typescript
Module System
Node Version
NPM Version
92.7
Supply Chain
91.6
Quality
86.3
Maintenance
100
Vulnerability
99.6
License
TypeScript (98.79%)
JavaScript (1.21%)
Total Downloads
2,055,844
Last Day
2,179
Last Week
49,769
Last Month
212,262
Last Year
1,729,665
MIT License
357 Stars
196 Commits
58 Forks
3 Watchers
4 Branches
6 Contributors
Updated on Jun 30, 2025
Minified
Minified + Gzipped
Latest Version
2.3.1
Package Id
@yudiel/react-qr-scanner@2.3.1
Unpacked Size
211.52 kB
Size
103.78 kB
File Count
83
NPM Version
10.9.2
Node Version
22.15.0
Published on
May 06, 2025
Cumulative downloads
Total Downloads
Last Day
11.4%
2,179
Compared to previous day
Last Week
-10.9%
49,769
Compared to previous week
Last Month
-3.2%
212,262
Compared to previous month
Last Year
473.7%
1,729,665
Compared to previous year
2
16
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. |
scanDelay | number | No | Delay in milliseconds between scans. |
allowMultiple | boolean | No | If true , ignore same barcode being scanned. |
sound | boolean or base64string | No | If true , default sound will be play. You are able to set a Base64 to use a custom sound. |
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 onOff?: boolean; 4 torch?: boolean; 5 zoom?: boolean; 6 finder?: boolean; 7}
IScannerStyles
1export interface IScannerStyles { 2 container?: CSSProperties; 3 video?: CSSProperties; 4 finderBorder?: number; 5}
No vulnerabilities found.
No security vulnerabilities found.