2.0.12 • Published 9 months ago

react-qr-code v2.0.12

Weekly downloads
14,674
License
MIT
Repository
github
Last release
9 months ago

react-qr-code

npm package Dependency Status devDependency Status peerDependency Status

A component for React. This library works with React and React Native (using React Native SVG).

Screenshots

Web

Android & iOS

Installation

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

The Gist

import React from "react";
import ReactDOM from "react-dom";
import QRCode from "react-qr-code";

ReactDOM.render(<QRCode value="hey" />, document.getElementById("Container"));

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.

<div style={{ background: 'white', padding: '16px' }}>
    <QRCode ... />
</div>

Responsive QR code example:

// Can be anything instead of `maxWidth` that limits the width.
<div style={{ height: "auto", margin: "0 auto", maxWidth: 64, width: "100%" }}>
    <QRCode
    size={256}
    style={{ height: "auto", maxWidth: "100%", width: "100%" }}
    value={value}
    viewBox={`0 0 256 256`}
    />
</div>

API

proptypedefault value
bgColorstring'#FFFFFF'
fgColorstring'#000000'
levelstring ('L' 'M' 'Q' 'H')'L'
sizenumber256
titlestring
valuestring

License

MIT

@sirclo/nexus@borderfreefinancial/revo-core@borderfreefinancial/revo-core-apicustomer-query-front-end@pangolindex/componentsgimly-siop-qr-code-generator@infinitebrahmanuniverse/nolb-react-q@motionly/components@everything-registry/sub-chunk-2605oidc-auth-betagiai-phau-benhgimme-satsgrk-lolfood-trace-xmugearboxdownloadmodaldropzone-react-tailwindharbest-backofficehemmeligasasvirtuaisscandoc-react-componentskash-cash-sdkkyte-sdkkwl-lib-betamuffin-sdkmycarnet-ui-componentmoralis-uimoon-intercom-chatnorthants-design-systemnmtsmartformsdkpioneer-reactpkg-componentspkg-components-hnlordering-ui-admin-externalorca-ar-webrc-qrcode-scannerqr-code-simpleradcod-reactreact-girocodereact-tyre-eu-labelreact-pay-with-creact-qr-bcl-csreact-custom-components-libraryquodsedreact-wagerpay@envanik/componentsswapkit-providersmart-salon-pos-systemtesting-pay-with-crypto-widgetthebadge-ui-librarythe-handsomestnerd-internalthrmdy-venom-connectsimple-modal-v2supertokens-auth-reactvelexercitationemvenom-connect@crypteriat/cryptopay@crystaldesign/content-box@dfx.swiss/react-components@crystaldesign/diva-web-planner-react@covalenthq/goldrush-kit@cubitrix/cubitrix-react-ui-module@digitalfactory/componentswebmuisanity-qr-code-generatorvite-radcod-reacttouchless-navigationtestwidgetunificatedzk-auth-sdkweb3-checkout@knowgistics/core@koyweforest/koywe-ramp-sdk@inceptionbg/main@incodetech/welcome@hello3/react@heliofi/react@drodil/backstage-plugin-toolbox@honeycomb-finance/walletmodalcllk@marsprotocol/wallet-connector@kadafial/tweb-react@gimly-blockchain/gimlyid-qr-code-generator@getvolume/react@armenotech/fpf@asius/components223300-qr@cardscan.ai/insurance-cardscan-react@catena-network/catena-ui-moduledownloadmodalconnextconnext-browser-sdk@nofrixion/components@thebadge/ui-library@thelanding/ui@sphereon/gimlyid-qr-code@sphereon/waci-pex@sphereon/ssi-sdk-qr-code-generator@sphereon/ssi-sdk-qr-react@sphereon/ssi-sdk-waci-pex-qr-react@sphereon/ssi-sdk-waci-pex@sphereon/ssi-sdk.qr-code-generator
2.0.12

9 months ago

2.0.11

1 year ago

2.0.9

1 year ago

2.0.10

1 year ago

2.0.8

2 years ago

2.0.7

2 years ago

2.0.6

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.3

2 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.3

5 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.1-rc.7

8 years ago

0.0.1-rc.6

8 years ago

0.0.1-rc.5

8 years ago

0.0.1-rc.4

8 years ago

0.0.1-rc.3

8 years ago

0.0.1-rc.2

8 years ago

0.0.1-rc.1

8 years ago