Gathering detailed insights and metrics for @blackbox-vision/react-qr-reader
Gathering detailed insights and metrics for @blackbox-vision/react-qr-reader
Gathering detailed insights and metrics for @blackbox-vision/react-qr-reader
Gathering detailed insights and metrics for @blackbox-vision/react-qr-reader
npm install @blackbox-vision/react-qr-reader
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
56 Stars
283 Commits
11 Forks
6 Watching
9 Branches
13 Contributors
Updated on 04 Jul 2024
TypeScript (90.46%)
JavaScript (9.54%)
Cumulative downloads
Total Downloads
Last day
-1.8%
1,707
Compared to previous day
Last week
1.4%
7,548
Compared to previous week
Last month
4.4%
31,196
Compared to previous month
Last year
465.1%
496,047
Compared to previous year
2
37
:rocket: React QR Reader component. Check out the demo.
You need a component for Scanning QR codes from a web browser based app.
This component has been tested in the following browsers:
Since this library does internal use of hooks you need React >= 16.8.0
.
You can install this library via NPM or YARN.
1npm i @blackbox-vision/react-qr-reader
1yarn add @blackbox-vision/react-qr-reader
After reading and performing the previous steps, you should be able to import the library and use it like in this example:
1import React, { useState } from 'react'; 2import { QrReader } from '@blackbox-vision/react-qr-reader'; 3 4const Test = (props) => { 5 const [data, setData] = useState('No result'); 6 7 return ( 8 <> 9 <QrReader 10 onResult={(result, error) => { 11 if (!!result) { 12 setData(result?.text); 13 } 14 15 if (!!error) { 16 console.info(error); 17 } 18 }} 19 style={{ width: '100%' }} 20 /> 21 <p>{data}</p> 22 </> 23 ); 24};
The QrReader
component has the following props:
Properties | Types | Default Value | Description |
---|---|---|---|
constraints | MediaTrackConstraints | { facingMode: 'user' } | Specify which camera should be used (if available). |
onResult | function | none | Scan event handler |
videoId | string | video | The ID for the video element |
scanDelay | number | 500 | The scan period for the QR hook |
ViewFinder | component | none | ViewFinder component to rendering over the video element |
className | string | none | ClassName for the container element. |
containerStyle | object | none | Style object for the container element. |
videoContainerStyle | object | none | Style object for the video container element. |
videoStyle | object | none | Style object for the video element. |
If you need to support older browsers, checkout this guide in how to make it compatible with legacy ones
Please, open an issue following one of the issues templates. We will do our best to fix them.
If you want to contribute to this project see contributing for more information.
Distributed under the MIT license. See LICENSE for more information.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
88 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More