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

zmp-qrcode

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zmp-qrcode

React component for generating QR Code that match Zalo Miniapps looks and feels.

  • 3.0.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ZMP QR Code

React component for generating QR codes that match Zalo Mini App looks and feels.

Installation

npm i zmp-qrcode

Usage

import { QRCode } from 'zmp-qrcode'

<QRCode value="https://www.npmjs.com/package/zmp-qrcode" />

Preview

API Documentation

QRCode

Props

NameDescriptionDefault
value*string-
sizenumber128

Ref

You can export the QR code as a base64 image using ref. Here is an example:

export const Base64 = (args) => {
  const ref = useRef<QRCodeInstance>()
  const [src, setSrc] = useState('');

  return <div>
    <QRCode ref={el => el ? setTimeout(() => setSrc(el.getBase64()), 1000) : el} {...args} rounded />
    <img src={src} alt="" />
  </div>
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Keywords

FAQs

Package last updated on 24 Apr 2024

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