Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-qrcode-logo

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-qrcode-logo

React component to generate a QR Code customizable with logo and more properties

  • 2.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
51K
decreased by-22.85%
Maintainers
1
Weekly downloads
 
Created
Source

Typescript React component to generate a customizable QR Code. Inspired by cssivision/qrcode-react and zpao/qrcode.react.

Installation

npm install --save react-qrcode-logo

Usage

import * as React from 'react';
import { QRCode } from 'react-qrcode-logo';

React.render(
  <QRCode value="https://github.com/gcoro/react-qrcode-logo" />,
  mountNode
);

Available Props

PropTypeDefault valueDescription
valuestringhttps://reactjs.org/The value encoded in the QR Code. When the QR is decoded, this value will be returned
ecLevelstringMThe error correction level of the QR Code. It can be either of 'L', 'M', 'Q', 'H'
enableCORSbooleanfalseEnable crossorigin attribute
sizenumber (in pixels)150The size of the canvas. Note that in this size is included both the QR Code size itself and the padding aound it
paddingnumber (in pixels)10The padding around the QR Code. This will be the same color of the QR Code bgColor
bgColorstring (css color)#FFFFFFBackground color
fgColorstring (css color)#000000Foreground color
logoImagestring (src attribute)The logo image. It can be a url/path or a base64 value
logoWidthnumber (in pixels)size * 0.2Logo image width
logoHeightnumber (in pixels)logoWidthLogo image height
logoOpacitynumber (css opacity 0 <= x <= 1)1Logo opacity. This allows you to modify the transparency of your logo, so that it won't compromise the readability of the QR Code
styleObject (css style properties){ height: size, width: size, padding: padding, bgColor: bgColor}You can specify an object with any css style properties you want to add to the canvas. The properties you specify will override the default ones

Keywords

FAQs

Package last updated on 30 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc