{"id":13625517,"url":"https://github.com/JodusNodus/react-qr-reader","last_synced_at":"2025-04-16T06:32:49.892Z","repository":{"id":37586917,"uuid":"58797109","full_name":"JodusNodus/react-qr-reader","owner":"JodusNodus","description":"React component for reading QR codes from webcam.","archived":false,"fork":false,"pushed_at":"2023-11-27T17:58:07.000Z","size":3993,"stargazers_count":1153,"open_issues_count":152,"forks_count":418,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-13T20:39:28.785Z","etag":null,"topics":["javascript","qr-code","qrcode","react","reactjs","webcam","webrtc"],"latest_commit_sha":null,"homepage":"https://jodusnodus.github.io/react-qr-reader","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/JodusNodus.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":"2016-05-14T08:12:28.000Z","updated_at":"2025-04-13T02:25:42.000Z","dependencies_parsed_at":"2024-01-14T08:08:38.821Z","dependency_job_id":"5284b511-f504-4804-95be-bfac26f612a2","html_url":"https://github.com/JodusNodus/react-qr-reader","commit_stats":{"total_commits":278,"total_committers":21,"mean_commits":"13.238095238095237","dds":0.6402877697841727,"last_synced_commit":"c7e15006060c2c8aebee372491d65db7c1312383"},"previous_names":["react-qr-reader/react-qr-reader"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JodusNodus%2Freact-qr-reader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JodusNodus%2Freact-qr-reader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JodusNodus%2Freact-qr-reader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JodusNodus%2Freact-qr-reader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JodusNodus","download_url":"https://codeload.github.com/JodusNodus/react-qr-reader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249098313,"owners_count":21212468,"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":["javascript","qr-code","qrcode","react","reactjs","webcam","webrtc"],"created_at":"2024-08-01T21:01:57.103Z","updated_at":"2025-04-16T06:32:49.871Z","avatar_url":"https://github.com/JodusNodus.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# React QR Reader [![npm version](https://badge.fury.io/js/react-qr-reader.svg)](https://badge.fury.io/js/react-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/react-qr-reader/react-qr-reader/badge.svg)](https://snyk.io/test/github/react-qr-reader/react-qr-reader)\n\n:rocket: React QR Reader component. Check out the [demo](https://react-qr-reader.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 react-qr-reader\n```\n\n### YARN\n\n```bash\nyarn add 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 '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## Maintainers\n\n- Created by [@JodusNodus](https://github.com/JodusNodus) .\n- Revived thanks to [@JonatanSalas](https://github.com/JonatanSalas) and his company [@BlackBoxVision](https://github.com/BlackBoxVision) .\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/react-qr-reader/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/react-qr-reader/react-qr-reader/blob/master/CONTRIBUTING.md) for more information.\n\n## License\n\nDistributed under the **MIT license**. See [LICENSE](https://github.com/react-qr-reader/react-qr-reader/blob/master/LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJodusNodus%2Freact-qr-reader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJodusNodus%2Freact-qr-reader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJodusNodus%2Freact-qr-reader/lists"}