0.8.11 • Published 3 years ago

@pluginjs/qrcode v0.8.11

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
3 years ago

Qrcode

npm package

A flexible modern qrcode js plugin.

Samples

Introduction

Installation

Yarn

yarn add @pluginjs/qrcode

NPM

npm i @pluginjs/qrcode

Getting Started

CDN:

Development:

<script src="https://unpkg.com/@pluginjs/qrcode/dist/qrcode.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@pluginjs/qrcode/dist/qrcode.css">

Production:

<script src="https://unpkg.com/@pluginjs/qrcode/dist/qrcode.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@pluginjs/qrcode/dist/qrcode.min.css">

Initialize

HTML:

<div class="element"></div>

ECMAScript Module:

import qrcode from "@pluginjs/qrcode"
import "@pluginjs/qrcode/dist/qrcode.css"

qrcode.of(document.querySelector('.element'), options)

CommonJS:

require("@pluginjs/qrcode/dist/qrcode.css")
const qrcode = require("@pluginjs/qrcode")

qrcode.of(document.querySelector('.element'), options)

Browser:

<link rel="stylesheet" href="https://unpkg.com/@pluginjs/qrcode/dist/qrcode.css">
<script src="https://unpkg.com/@pluginjs/qrcode/dist/qrcode.js"></script>
<script>
  Pj.qrcode('.element', options)
</script>

API

Options

Options are called on qrcode instances through the qrcode options itself. You can also save the instances to variable for further use.

NameDescriptionDefault
"text"QR Code content.
"padding"white space padding.10
"width"QR Code width in pixels256
"height"QR Code height in pixels256
"reverse"Use parent background as backgroundfalse
"background"color of background, color name or hex string.#000000
"foreground"color of modules, color name or hex string.#ffffff
"correctLevel"error correction level.L, M, H, Q

More options references the jrQrcode's options.

Events

Events are called on qrcode instances through the qrcode events itself. You can also save the instances to variable for further use.

NameDescription
"ready"Gets fired when plugin is ready
"destroy"Gets fired when plugin is destroy

Methods

Methods are called on qrcode instances through the qrcode method itself. You can also save the instances to variable for further use.

NameDescription
"destroy"Destroy plugin

Browser support

Tested on all major browsers.

IE / EdgeFirefoxChromeSafariOpera
IE11, Edgelast 2 versionslast 2 versionslast 2 versionslast 2 versions

License

@pluginjs/qrcode is Licensed under the GPL-v3 license.

If you want to use @pluginjs/qrcode project to develop commercial sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary.

For purchase an Commercial License, contact us purchase@thecreation.co.

Copyright

Copyright (C) 2022 Creation Studio Limited.

0.8.11

3 years ago

0.8.10

3 years ago

0.8.9

4 years ago

0.8.8

4 years ago

0.8.7

4 years ago

0.8.6

4 years ago

0.8.5

5 years ago

0.8.4

5 years ago

0.8.3

5 years ago

0.8.2

5 years ago