2.0.15 • Published 10 months ago

react-qr-code v2.0.15

Weekly downloads
14,674
License
MIT
Repository
github
Last release
10 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 valueplatform
bgColorstring'#FFFFFF'web, ios, android
fgColorstring'#000000'web, ios, android
levelstring ('L' 'M' 'Q' 'H')'L'web, ios, android
sizenumber256web, ios, android
titlestringweb
valuestringweb, ios, android

License

MIT

@sirclo/nexus@borderfreefinancial/revo-core@borderfreefinancial/revo-core-apicustomer-query-front-endgimly-siop-qr-code-generator@infinitebrahmanuniverse/nolb-react-q@motionly/components@everything-registry/sub-chunk-2605oidc-auth-betasimple-modal-v2grk-lolweb3-wallet-selectorsupertokens-auth-reacttesting-pay-with-crypto-widgettestwidgetunificatedtest_truetoform_fit_widgetswapkit-providerthebadge-ui-librarythe-handsomestnerd-internalvite-radcod-reactvenom-connect@drodil/backstage-plugin-toolbox@crypteriat/cryptopay@crystaldesign/content-box@crystaldesign/product-detail-page@crystaldesign/diva-web-planner-react@cubitrix/cubitrix-react-ui-module@covalenthq/goldrush-kitcleaker.clientjrgcomponentskash-cash-sdkkwl-lib-betaasasvirtuais@digitalfactory/componentspackage-react-wrapper-materialtouchless-navigationthrmdy-venom-connect@apillon/wallet-ui@arubaya/seoul@armenotech/fpf@andex/wallet-kit@asius/components@aioha/react-ui@alicd/storybook-decorator-cone@aws-northstar/ui@bedrock-foundation/react-sdk@catalabs/bitcoin-widget@catena-network/catena-ui-module@brilliant_emporium/ui@cardscan.ai/insurance-cardscan-react@classon/nextui@chimoney/offline-pay-with-crypto-widget@chainfuse/ui223300-qr@coinmasters/pioneer-lib@dfx.swiss/react-components@dfx.swiss/services-reactweb3-checkoutwebmuivelexercitationemzk-auth-sdk@filen/web@heliofi/react@hello3/react@hivello/storybook-electron@honeycomb-finance/walletmodal@edu-tosel/design@eduact/ed-components@getvolume/react@gimly-blockchain/gimlyid-qr-code-generator@koyweforest/koywe-ramp-sdk@iobroker/json-config@makee/common-packages@marsprotocol/wallet-connector@nnc-digital/nnc-design-system@nofrixion/components@envanik/components@mercoa/react@kadafial/tweb-react@janiscommerce/app-barcode-generator@kloudlite/design-system@knowgistics/core@inceptionbg/file-utils@incodetech/welcome@qorebase/app-runtime@reclaimprotocol/reclaim-connect-react@recklesstechnology/create-reckless-tech-app@reclaimprotocol/react-components@open-tender/ui@openeventkit/event-site@oneauxilia/oneauxilia-react@polygram/wallet@nsfw-app/ui@pioneer-platform/pioneer-react@openware/opendax-web-sdk@pangolindex/components@pelcro/react-pelcro-js@owlprotocol/ui-react@sphereon/ssi-sdk-waci-pex@sphereon/ssi-sdk-waci-pex-qr-react
2.0.15

10 months ago

2.0.14

11 months ago

2.0.13

12 months ago

2.0.12

2 years ago

2.0.11

2 years ago

2.0.9

2 years ago

2.0.10

2 years ago

2.0.8

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.1.3

6 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.1-rc.7

9 years ago

0.0.1-rc.6

9 years ago

0.0.1-rc.5

9 years ago

0.0.1-rc.4

9 years ago

0.0.1-rc.3

9 years ago

0.0.1-rc.2

9 years ago

0.0.1-rc.1

9 years ago