qe

qr-element

qrcode html element

Showing:

Popularity

Downloads/wk

5

GitHub Stars

12

Maintenance

Last Commit

8yrs ago

Contributors

0

Package

Dependencies

2

Size (min+gzip)

5.2KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

qr-element

qrcode dom element

var qr = require('qr-element');

// default canvas rendering
var qrcode = qr('foo', {
    width: 128,
    height: 128
});

qrcode // =>

interactive readme
interactive example

package your app with browserify

script tag users

<script src="https://raw.github.com/shtylman/qr-element/master/dist/qr.js"></script>
<script>
var qrcode = qr('foo', {
    width: 128,
    height: 128
});

document.body.appendChild(qrcode);
</script>

qr is exposed to the global namespace or it can work with other module loading system.

options

render

default 'canvas'

Optionally specify 'table' if you want rendering to be done via an html table versus canvas. 'table' fallback will be used automatically if canvas is not available in the browser.

width

Width in pixels of the element

height

Height in pixels of the element

background

default #fff

Background color hex

foreground

default #000

Foreground color hex

typeNumber

correctLevel

install

npm install qr-element

Use with browserify

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100