{"id":13725155,"url":"https://github.com/rosskhanas/react-qr-code","last_synced_at":"2025-05-07T19:33:00.602Z","repository":{"id":37686701,"uuid":"64432891","full_name":"rosskhanas/react-qr-code","owner":"rosskhanas","description":"A QR code generator for React and React Native.","archived":false,"fork":false,"pushed_at":"2024-05-13T15:33:47.000Z","size":6415,"stargazers_count":652,"open_issues_count":14,"forks_count":71,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-05-22T07:02:45.504Z","etag":null,"topics":["component","qr-code","react","react-native"],"latest_commit_sha":null,"homepage":"https://rosskhanas.github.io/react-qr-code/","language":"Java","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/rosskhanas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-28T22:43:55.000Z","updated_at":"2024-06-20T20:20:56.013Z","dependencies_parsed_at":"2024-02-11T16:31:27.471Z","dependency_job_id":"0e196787-bc16-4a63-bf57-bb3315875bb1","html_url":"https://github.com/rosskhanas/react-qr-code","commit_stats":{"total_commits":248,"total_committers":23,"mean_commits":"10.782608695652174","dds":0.560483870967742,"last_synced_commit":"ade96f86a85d8018e94663462a18e609029dacaa"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosskhanas%2Freact-qr-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosskhanas%2Freact-qr-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosskhanas%2Freact-qr-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rosskhanas%2Freact-qr-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rosskhanas","download_url":"https://codeload.github.com/rosskhanas/react-qr-code/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224556938,"owners_count":17331088,"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":["component","qr-code","react","react-native"],"created_at":"2024-08-03T01:02:14.495Z","updated_at":"2025-05-07T19:33:00.554Z","avatar_url":"https://github.com/rosskhanas.png","language":"Java","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# react-qr-code\n\n[![npm package](https://badge.fury.io/js/react-qr-code.svg)](https://www.npmjs.org/package/react-qr-code)\n[![Dependency Status](https://david-dm.org/rosskhanas/react-qr-code.svg)](https://david-dm.org/rosskhanas/react-qr-code)\n[![devDependency Status](https://david-dm.org/rosskhanas/react-qr-code/dev-status.svg)](https://david-dm.org/rosskhanas/react-qr-code#info=devDependencies)\n[![peerDependency Status](https://david-dm.org/rosskhanas/react-qr-code/peer-status.svg)](https://david-dm.org/rosskhanas/react-qr-code#info=peerDependencies)\n\nA \u003cQRCode /\u003e component for React. This library works with React and React Native\n(using [React Native SVG](https://github.com/react-native-svg/react-native-svg)).\n\n### Screenshots\n\n#### [Web](https://rosskhanas.github.io/react-qr-code/)\n\n\u003cimg src=\"https://github.com/rosskhanas/react-qr-code/blob/master/demo-web.png\" width=\"640\" /\u003e\n\n#### Android \u0026 iOS\n\n\u003cdiv float=\"left\"\u003e\n    \u003cimg src=\"https://github.com/rosskhanas/react-qr-code/blob/master/demo-android.png\" width=\"320\" /\u003e\n    \u003cimg src=\"https://github.com/rosskhanas/react-qr-code/blob/master/demo-ios.png\" width=\"265\" /\u003e\n\u003c/div\u003e\n\n### Installation\n\n```\nnpm i react-qr-code\n```\n\nWhen using this library with React Native, you will also need to [have `react-native-svg` installed](https://github.com/react-native-svg/react-native-svg#installation).\n\n```\nnpm i react-native-svg\ncd ios \u0026\u0026 pod install\n```\n\n### The Gist\n\n```javascript\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport QRCode from \"react-qr-code\";\n\nReactDOM.render(\u003cQRCode value=\"hey\" /\u003e, document.getElementById(\"Container\"));\n```\n\nNote: If the QR code is likely to appear next to dark objects, you will need to wrap it in a light-colored container to preserve the '[quiet zone](https://qrworld.wordpress.com/2011/08/09/the-quiet-zone/)', e.g. \n\n```javascript\n\u003cdiv style={{ background: 'white', padding: '16px' }}\u003e\n  \u003cQRCode ... /\u003e\n\u003c/div\u003e\n```\n\nResponsive QR code example:\n\n```javascript\n// Can be anything instead of `maxWidth` that limits the width.\n\u003cdiv style={{ height: \"auto\", margin: \"0 auto\", maxWidth: 64, width: \"100%\" }}\u003e\n  \u003cQRCode\n    size={256}\n    style={{ height: \"auto\", maxWidth: \"100%\", width: \"100%\" }}\n    value={value}\n    viewBox={`0 0 256 256`}\n  /\u003e\n\u003c/div\u003e\n```\n\n### API\n\n| prop      | type                         | default value | platform          |\n| --------- | ---------------------------- | ------------- |-------------------|\n| `bgColor` | `string`                     | '#FFFFFF'     | web, ios, android |\n| `fgColor` | `string`                     | '#000000'     | web, ios, android |\n| `level`   | `string` (`'L' 'M' 'Q' 'H'`) | 'L'           | web, ios, android |\n| `size`    | `number`                     | 256           | web, ios, android |\n| `title`   | `string`                     |               | web               |\n| `value`   | `string`                     |               | web, ios, android |\n\nAdheres to the [official QR spec](https://www.qrcode.com/en/about/version.html) and can store up to 2953 characters in `value`.\n\n### License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosskhanas%2Freact-qr-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frosskhanas%2Freact-qr-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frosskhanas%2Freact-qr-code/lists"}