Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cssivision/qrcode-react
a react component to generate QRCode with logo
https://github.com/cssivision/qrcode-react
qrcode react
Last synced: 13 days ago
JSON representation
a react component to generate QRCode with logo
- Host: GitHub
- URL: https://github.com/cssivision/qrcode-react
- Owner: cssivision
- License: mit
- Created: 2015-11-23T14:55:09.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-07-07T03:42:06.000Z (over 2 years ago)
- Last Synced: 2024-10-05T22:03:38.619Z (about 1 month ago)
- Topics: qrcode, react
- Language: JavaScript
- Homepage: http://cssivision.github.io/qrcode-react/
- Size: 336 KB
- Stars: 153
- Watchers: 6
- Forks: 32
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# qrcode-react
A React component to generate [QRCode](http://en.wikipedia.org/wiki/QR_code) with logo.
Inspired by [zpao/qrcode.react](https://github.com/zpao/qrcode.react), also support chinese.## Installation
```sh
npm install qrcode-react
```## Usage
```js
var React = require('react');
var ReactDOM = require('react-dom');
var QRCode = require('qrcode-react');ReactDOM.render(
,
mountNode
);
```## Available Props
prop | type | default value
-------------|----------------------|-----------------------------------
`value` | `string` | `http://facebook.github.io/react/`
`size` | `number` | `128`
`bgColor` | `string` (CSS color) | `"#FFFFFF"`
`fgColor` | `string` (CSS color) | `"#000000"`
`logo` | `string` (URL / PATH)|
`logoWidth` | `number` | `size * 0.2`
`logoHeight` | `number` | Proportional scaling to `logoWidth`