kciter/qart.js

Generate artistic QR code. 🎨

JavaScript

3,188

93 commits

updated Sep 2, 2023

See the code

README

qart.js

CDNJS Downloads Version License
Merges Pictures and QR Codes for Artistic QR Codes.

Glance At

https://kciter.github.io/qart.js/

Installation

NPM

$ npm install qartjs

or clone this repository and copy qart.min.js to your project.

CDN

<script src="https://cdnjs.cloudflare.com/ajax/libs/qartjs/1.0.2/qart.min.js"></script>

Usage

In the browser

<script src="../dist/qart.min.js"></script>
<script>
  // directly appending canvas to the document
  new QArt({
    value: value,
    imagePath: './example.png',
    filter: filter,
    size: 195
	}).make(document.getElementById('qart'));

	// using callback
	new QArt({
      value: value,
      imagePath: './example.png',
      filter: filter,
      size: 195
  	}).make(function (canvas) {
  	  document.getElementById('qart').appendChild(canvas)
  	});
</script>

With ES6

import QArt from 'qartjs';
const qart = new QArt({
  value: value,
  imagePath: './example.png',
  filter: filter,
  size: 195
});

// directly appending canvas to the document
qart.make(document.getElementById('qart'))

// using callback
qart.make((canvas) => {
  document.getElementById('qart').appendChild(canvas);
});

With React

This is a simple implementation of QArt as React Component. react-qart

With Angular.JS

There is a directive available for using qart.js in Angular.js: angular-qart

With Vue 2.x

There is a directive available for using qart.js in Vue.js 2.x : vue-qart

Options

FieldTypeDescriptionDefault
valueStringThe data of the QR code.Required
imagePathStringThe path of the combined image.Required
filterStringDefine an image filter. threshold or colorthreshold
sizeIntegerDefine an image size in pixels.195
versionIntegerQRCode version (1 <= version <= 40)10
backgroundCSSColorImplement background if existundefinded
fillTypescale_to_fit/fillPlace image type(fill or scale to fit)scale_to_fit

Dependency

Inspire

TODO

  • Server-Side Rendering.
  • CLI Command.

If you like this open source, you can sponsor it. 😄

LICENSE

GPLv3

javascript
qart
qrcode
qr-codes

kciter/qart.js

Generate artistic QR code. 🎨

JavaScript

3,188

93 commits

updated Sep 2, 2023

See the code

README

qart.js

CDNJS Downloads Version License
Merges Pictures and QR Codes for Artistic QR Codes.

Glance At

https://kciter.github.io/qart.js/

Installation

NPM

$ npm install qartjs

or clone this repository and copy qart.min.js to your project.

CDN

<script src="https://cdnjs.cloudflare.com/ajax/libs/qartjs/1.0.2/qart.min.js"></script>

Usage

In the browser

<script src="../dist/qart.min.js"></script>
<script>
  // directly appending canvas to the document
  new QArt({
    value: value,
    imagePath: './example.png',
    filter: filter,
    size: 195
	}).make(document.getElementById('qart'));

	// using callback
	new QArt({
      value: value,
      imagePath: './example.png',
      filter: filter,
      size: 195
  	}).make(function (canvas) {
  	  document.getElementById('qart').appendChild(canvas)
  	});
</script>

With ES6

import QArt from 'qartjs';
const qart = new QArt({
  value: value,
  imagePath: './example.png',
  filter: filter,
  size: 195
});

// directly appending canvas to the document
qart.make(document.getElementById('qart'))

// using callback
qart.make((canvas) => {
  document.getElementById('qart').appendChild(canvas);
});

With React

This is a simple implementation of QArt as React Component. react-qart

With Angular.JS

There is a directive available for using qart.js in Angular.js: angular-qart

With Vue 2.x

There is a directive available for using qart.js in Vue.js 2.x : vue-qart

Options

FieldTypeDescriptionDefault
valueStringThe data of the QR code.Required
imagePathStringThe path of the combined image.Required
filterStringDefine an image filter. threshold or colorthreshold
sizeIntegerDefine an image size in pixels.195
versionIntegerQRCode version (1 <= version <= 40)10
backgroundCSSColorImplement background if existundefinded
fillTypescale_to_fit/fillPlace image type(fill or scale to fit)scale_to_fit

Dependency

Inspire

TODO

  • Server-Side Rendering.
  • CLI Command.

If you like this open source, you can sponsor it. 😄

LICENSE

GPLv3

javascript
qart
qrcode
qr-codes

Project health

Overall

2.1/10

Maintained

0/10

Code review

1/10
OpenSSF Scorecard

Significant stargazers

Jinzhu

5,589 followers · starred Feb 2017

Benjamin Tan

368 followers · starred Feb 2017

Florent Biville

104 followers · starred Jan 2017

André Luis Leal Cardoso Jr

148 followers · starred Jan 2017