1.0.0-beta.2 • Published 5 years ago

@qrcode/react v1.0.0-beta.2

Weekly downloads
26
License
MIT
Repository
github
Last release
5 years ago

QRCode: React

Renders QR Codes into a React element

Installation

npm install --save @qrcode/react

Usage

const QRCode = require('@qrcode/react')

const MyApp = () => (
  <QRCode value='http://example.com' />
)

Props

color: string

Sets the color of the QR Code dark patches. Defaults to black.

backgroundColor: string

Sets the color of the QR Code light patches. Defaults to white.

Note: you can set this value to transparent to not have a background at all.

margin: number

If this prop is set, the resulting image will have additional "points" of the background color on each side.

size: number

If this prop is set, the resulting view will have it's width and height property set to this value.

value: string

The data to render the QR Code from.