Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@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 '@leelexuan/react-qr-scanner'
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.
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.