A QR code generator for React and React Native.
npm install react-qr-code



A
(using React Native SVG).
#### Web

#### Android & iOS


```
npm i react-qr-code
When using this library with React Native, you will also need to have react-native-svg installed.
``
npm i react-native-svg
cd ios && pod install
`javascript
import React from "react";
import ReactDOM from "react-dom";
import QRCode from "react-qr-code";
ReactDOM.render(
`
Note: 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', e.g.
`javascript`
Responsive QR code example:
`javascriptmaxWidth
// Can be anything instead of that limits the width.`
style={{ height: "auto", maxWidth: "100%", width: "100%" }}
value={value}
viewBox={0 0 256 256}
/>
| prop | type | default value | platform |
| --------- | ---------------------------- | ------------- |-------------------|
| bgColor | string | '#FFFFFF' | web, ios, android |fgColor
| | string | '#000000' | web, ios, android |level
| | string ('L' 'M' 'Q' 'H') | 'L' | web, ios, android |size
| | number | 256 | web, ios, android |title
| | string | | web |value
| | string | | web, ios, android |
Adheres to the official QR spec and can store up to 2953 characters in value`.
MIT