Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
@leelexuan/react-qr-scanner
Advanced tools
An enhanced React library for QR code scanning with API interaction capabilities and support for mouse-click detection on bounding boxes.
This library extends the original QR scanning functionality from @yudiel/react-qr-scanner
by enhancing user interactions and improving feedback through visual and click-based capabilities.
onBoundingBoxClick
: Detects clicks within the bounding box.onNewBarCodeDetected
: Triggers when a new barcode is scanned.To see the original library in action, check out Yudiel's Demo.
npm install
npm run storybook
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 |
---|---|---|---|
onBoundingBoxClick | (rawValue: string) => void | Yes | Callback function that is called when a bounding box is clicked. |
onNewBarcodeDetected | (rawValue: string) => void | Yes | Callback function that is called when a new barcode/qr code is 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. |
FAQs
An enhanced React library for QR code scanning with API interaction capabilities and support for mouse-click detection on bounding boxes.
The npm package @leelexuan/react-qr-scanner receives a total of 120 weekly downloads. As such, @leelexuan/react-qr-scanner popularity was classified as not popular.
We found that @leelexuan/react-qr-scanner demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.