{"id":20995102,"url":"https://github.com/blackboxvision/react-qr-reader","last_synced_at":"2025-10-25T22:08:50.567Z","repository":{"id":37934823,"uuid":"248978182","full_name":"BlackBoxVision/react-qr-reader","owner":"BlackBoxVision","description":"React component for QR Scanning on web using Zxing library","archived":false,"fork":false,"pushed_at":"2023-02-20T06:28:38.000Z","size":4238,"stargazers_count":56,"open_issues_count":14,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-08T21:28:56.044Z","etag":null,"topics":["hooks","library","qr","qr-code-decoder","qr-code-reader","qr-scanning","qrcode-scanner","react"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlackBoxVision.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-03-21T13:08:48.000Z","updated_at":"2024-07-04T13:56:43.000Z","dependencies_parsed_at":"2024-01-23T17:41:49.307Z","dependency_job_id":"ef2bae88-e7fd-42aa-93d5-1de9923e9120","html_url":"https://github.com/BlackBoxVision/react-qr-reader","commit_stats":{"total_commits":266,"total_committers":17,"mean_commits":"15.647058823529411","dds":0.6278195488721805,"last_synced_commit":"bfd5e3e095e8e1bfde02b002eee5562d1979a542"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackBoxVision%2Freact-qr-reader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackBoxVision%2Freact-qr-reader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackBoxVision%2Freact-qr-reader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlackBoxVision%2Freact-qr-reader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlackBoxVision","download_url":"https://codeload.github.com/BlackBoxVision/react-qr-reader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253152959,"owners_count":21862291,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hooks","library","qr","qr-code-decoder","qr-code-reader","qr-scanning","qrcode-scanner","react"],"created_at":"2024-11-19T07:21:39.374Z","updated_at":"2025-10-25T22:08:45.524Z","avatar_url":"https://github.com/BlackBoxVision.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg al width=\"300\" height=\"380\" alt=\"Lib logo\" src=\"./qr-reader-logo.png\" style=\"width: 300px !important;\" /\u003e\n\u003c/p\u003e\n\n# React QR Reader [![npm version](https://badge.fury.io/js/%40blackbox-vision%2Freact-qr-reader.svg)](https://badge.fury.io/js/%40blackbox-vision%2Freact-qr-reader) [![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT) [![Known Vulnerabilities](https://snyk.io/test/github/blackboxvision/react-qr-reader/badge.svg)](https://snyk.io/test/github/blackboxvision/react-qr-reader)\n\n:rocket: React QR Reader component. Check out the [demo](https://blackboxvision.github.io/react-qr-reader).\n\n## Table of contents\n\n- [Use Case](#use-case)\n- [Compatibility](#compatibility)\n- [Installation](#installation)\n  - [NPM](#npm)\n  - [YARN](#yarn)\n- [Example Usage](#example-usage)\n- [QrReader API](#component-api)\n- [Browser support](#browser-support)\n- [Issues](#issues)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Use Case\n\nYou need a component for Scanning QR codes from a web browser based app.\n\n## Compatibility\n\nThis component has been tested in the following browsers:\n\n- Chrome Mac OS \u0026 Android\n- Firefox Mac OS \u0026 Android\n- Safari Mac OS \u0026 IOS\n\nSince this library does internal use of hooks you need `React \u003e= 16.8.0`.\n\n## Installation\n\nYou can install this library via NPM or YARN.\n\n### NPM\n\n```bash\nnpm i @blackbox-vision/react-qr-reader\n```\n\n### YARN\n\n```bash\nyarn add @blackbox-vision/react-qr-reader\n```\n\n## Example Usage\n\nAfter reading and performing the previous steps, you should be able to import the library and use it like in this example:\n\n```javascript\nimport React, { useState } from 'react';\nimport { QrReader } from '@blackbox-vision/react-qr-reader';\n\nconst Test = (props) =\u003e {\n  const [data, setData] = useState('No result');\n\n  return (\n    \u003c\u003e\n      \u003cQrReader\n        onResult={(result, error) =\u003e {\n          if (!!result) {\n            setData(result?.text);\n          }\n\n          if (!!error) {\n            console.info(error);\n          }\n        }}\n        style={{ width: '100%' }}\n      /\u003e\n      \u003cp\u003e{data}\u003c/p\u003e\n    \u003c/\u003e\n  );\n};\n```\n\n## Component API\n\nThe `QrReader` component has the following props:\n\n| Properties          | Types                                                                                           | Default Value            | Description                                              |\n| ------------------- | ----------------------------------------------------------------------------------------------- | ------------------------ | -------------------------------------------------------- |\n| constraints         | [MediaTrackConstraints](https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints) | `{ facingMode: 'user' }` | Specify which camera should be used (if available).      |\n| onResult            | `function`                                                                                      | none                     | Scan event handler                                       |\n| videoId             | `string`                                                                                        | `video`                  | The ID for the video element                             |\n| scanDelay           | `number`                                                                                        | `500`                    | The scan period for the QR hook                          |\n| ViewFinder          | component                                                                                       | none                     | ViewFinder component to rendering over the video element |\n| className           | string                                                                                          | none                     | ClassName for the container element.                     |\n| containerStyle      | object                                                                                          | none                     | Style object for the container element.                  |\n| videoContainerStyle | object                                                                                          | none                     | Style object for the video container element.            |\n| videoStyle          | object                                                                                          | none                     | Style object for the video element.                      |\n\n## Browser Support\n\nIf you need to support older browsers, checkout [this guide](https://github.com/zxing-js/library#browser-support) in how to make it compatible with legacy ones\n\n## Issues\n\nPlease, open an [issue](https://github.com/BlackBoxVision/react-qr-reader/issues) following one of the issues templates. We will do our best to fix them.\n\n## Contributing\n\nIf you want to contribute to this project see [contributing](https://github.com/BlackBoxVision/react-qr-reader/blob/master/CONTRIBUTING.md) for more information.\n\n## License\n\nDistributed under the **MIT license**. See [LICENSE](https://github.com/BlackBoxVision/react-qr-reader/blob/master/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackboxvision%2Freact-qr-reader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblackboxvision%2Freact-qr-reader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblackboxvision%2Freact-qr-reader/lists"}