Socket
Socket
Sign inDemoInstall

zmp-qrcode

Package Overview
Dependencies
1
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

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.


Version published
Weekly downloads
20
decreased by-74.68%
Maintainers
1
Install size
1.22 MB
Created
Weekly downloads
 

Readme

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

Last updated on 24 Apr 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc