All Projects → SumiMakito → Awesome Qr.js

SumiMakito / Awesome Qr.js

Licence: apache-2.0
An awesome QR code generator written in JavaScript.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Awesome Qr.js

Qrbtf
An art QR code (qrcode) beautifier. 艺术二维码生成器。https://qrbtf.com
Stars: ✭ 1,391 (+11.55%)
Mutual labels:  qr-code, qrcode-generator, qr, qrcode
Qr Ascii
A small library to generate QR codes with ascii
Stars: ✭ 63 (-94.95%)
Mutual labels:  qr-code, qrcode-generator, qr, qrcode
nova-qrcode-field
A Laravel Nova field to generate QR Code
Stars: ✭ 28 (-97.75%)
Mutual labels:  qrcode, qr-code, qr, qrcode-generator
React Qr Svg
React component for rendering SVG QR codes
Stars: ✭ 134 (-89.25%)
Mutual labels:  qr-code, qrcode-generator, qr, qrcode
art-qr
JavaScript library to generate beautiful QR code in browser 艺术二维码
Stars: ✭ 19 (-98.48%)
Mutual labels:  qrcode, qr, qrcode-generator
wifiqr
Create a QR code with your Wi-Fi login details
Stars: ✭ 207 (-83.4%)
Mutual labels:  qrcode, qr, qrcode-generator
Qrcode
QR-code encoder/decoder (no image recognition)
Stars: ✭ 34 (-97.27%)
Mutual labels:  qr-code, qrcode-generator, qrcode
Qr Code Scanner
📠 A simple, fast and useful progressive web application
Stars: ✭ 982 (-21.25%)
Mutual labels:  qr-code, qr, qrcode
paper-store
Cold store small files on paper as QR codes -- PGP keys, Bitcoin keys, Tox keys or any other small files in general.
Stars: ✭ 28 (-97.75%)
Mutual labels:  qrcode, qr-code, qr
quagga2-reader-qr
Quagga2 sample external reader for QR codes
Stars: ✭ 20 (-98.4%)
Mutual labels:  qrcode, qr-code, qr
Qrious
Pure JavaScript library for QR code generation using canvas
Stars: ✭ 1,160 (-6.98%)
Mutual labels:  qrcode-generator, qr, qrcode
js-qrcode
The library is for generating QR codes like SVG, HTML5 Canvas, PNG and JPG files, or text.
Stars: ✭ 35 (-97.19%)
Mutual labels:  qrcode, qr, qrcode-generator
qr
🔲 Generate QR Codes straight in your terminal!
Stars: ✭ 34 (-97.27%)
Mutual labels:  qrcode, qr, qrcode-generator
QR Attendance
This project is an attendance system which provides attendance on scanning QR code. The attendance is stored in Excel sheet named with the date of attendance taken. In this folder a file named Generate.py is used to generate the QR code for given input file. Attend.py file is for scanning the QR code
Stars: ✭ 17 (-98.64%)
Mutual labels:  qrcode, qr-code, qrcode-generator
Qr Code
Web Component for generating QR codes
Stars: ✭ 425 (-65.92%)
Mutual labels:  qr-code, qr, qrcode
vk-qr
VK QR Code generator library
Stars: ✭ 43 (-96.55%)
Mutual labels:  qrcode, qr-code, qr
pix-payload-generator.net
Gerar payload para qrcode estático PIX. (Sistema de pagamento instantâneo do Brasil) Sem a necessidade de conexão com um PSP.
Stars: ✭ 23 (-98.16%)
Mutual labels:  qrcode, qr, qrcode-generator
Qrcode
💮 amazing QRCode generator in Python (supporting animated gif) - Python amazing 二维码生成器(支持 gif 动态图片二维码)
Stars: ✭ 8,613 (+590.7%)
Mutual labels:  qrcode, qr-code, qrcode-generator
QRCode-Generator-PHP-Class
🚀 QRCode PHP class (library). QR Code Generator using vCard 4.0 and the Google Chart API
Stars: ✭ 91 (-92.7%)
Mutual labels:  qrcode, qr-code, qrcode-generator
QRCodeFX
Simple tool to generate/read QR Code and export it.
Stars: ✭ 31 (-97.51%)
Mutual labels:  qrcode, qr-code, qrcode-generator

Awesome-qr.js

license

An awesome but simple QR code generator written in JavaScript.

Gallery

These QR codes were made with Awesome-qr.js 🤗

Contents

Getting Started

Node.js

Type definitions are included in the npm package.

Please read ⚠️

Awesome-qr.js uses node-canvas as its drawing backend. You might need to take a look at its documentation to ensure that node-canvas works on your environment.

yarn add awesome-qr // using Yarn
npm install --save awesome-qr // using NPM

Awesome-qr.js prior to v2.0.0 does not work well in Node.js environment and Awesome-qr.js prior to v1.2.0 does not work in Node.js environment.

const { AwesomeQR } = require("awesome-qr");
const fs = require("fs");

// ...

const background = fs.readFileSync("background.png");

const buffer = await new AwesomeQR({
  text: "AwesomeQR by Makito - Awesome, right now.",
  size: 500,
  backgroundImage: background,
}).draw();

fs.writeFileSync("qrcode.png", buffer);

Browsers

⚛️   If you're using React, please use react-awesome-qr.

<!-- import to the global scope -->
<script src="dist/awesome-qr.js"></script>

<!-- or use require.js -->
<script>
  require(["dist/awesome-qr.js"], (AwesomeQR) => ...);
</script>
var background;
var reader = new FileReader();
reader.onload = function () {
  background = this.result;
  new AwesomeQR({
    text: "AwesomeQR by Makito - Awesome, right now.",
    size: 500,
    backgroundImage: background,
  }).draw().then((dataURL) => );
};
reader.readAsDataURL(file);

Options

Options is an object that you can pass to the generator to customize your QR code.

Options {
  text: string;
  size?: number;
  margin?: number;
  correctLevel?: number;
  maskPattern?: number;
  version?: number;
  colorDark?: string;
  colorLight?: string;
  autoColor?: boolean;
  backgroundImage?: string | Buffer;
  backgroundDimming?: string;
  gifBackground?: ArrayBuffer;
  whiteMargin?: boolean;
  dotScale?: number;
  logoImage?: string | Buffer;
  logoScale?: number;
  logoMargin?: number;
  logoCornerRadius?: number;
};

text

string

Text to be encoded in the QR code.

size

number?, default: 400

Size of the QR code in pixel.

margin

number?, default: 20

Size of margins around the QR code body in pixel.

correctLevel

number?, default: QRErrorCorrectLevel.M = 0

For more information, please refer to Error correction feature | QRcode.com | DENSO WAVE.

Error correction level of the QR code.

maskPattern

number?, continue reading to learn more

This is an advanced option.

Leave untouched to let the code decide which mask pattern to use.

Specify the mask pattern to be used in QR code encoding.

Accepts a value provided by QRMaskPattern.

To find out all eight mask patterns, please refer to Wikipedia File:QR_Code_Mask_Patterns.svg

For more information, please refer to Reed–Solomon codes for coders: Masking.

version

number?, continue reading to learn more

This is an advanced option.

Leave untouched to let the code decide which version to use.

Specify the version to be used in QR code encoding.

Accepts an integer in range [1, 40].

⚠️   An error might occurs if the specified version does not have enough space for the input data.

For more information, please refer to Information capacity and versions of QR Code | QRcode.com | DENSO WAVE.

colorDark

string?, CSS <color>, default: "#000000"

For more information about CSS <color>, please refer to <color> - CSS: Cascading Style Sheets | MDN

Color of the blocks on the QR code.

colorLight

string?, CSS <color>, default: "#ffffff"

Color of the empty areas on the QR code.

autoColor

boolean?, default: true

Automatically calculate the colorDark value from the QR code's background.

backgroundImage

(string|Buffer)?, default: undefined

Background image to be used in the QR code.

Accepts a data: string in web browsers or a Buffer in Node.js.

backgroundDimming

string?, CSS <color>, default: "rgba(0, 0, 0, 0)"

Color of the dimming mask above the background image.

gifBackground

ArrayBuffer?, default: undefined

GIF background image to be used in the QR code.

whiteMargin

boolean?, default: true

Use a white margin instead of a transparent one which reveals the background of the QR code on margins.

dotScale

number?, default: 0.4

Ratio of the real size to the full size of the blocks.

This can be helpful when you want to make more parts of the background visible.

logoImage

(string|Buffer)?, default: undefined

Logo image to be displayed at the center of the QR code.

Accepts a data: string in web browsers or a Buffer in Node.js.

When set to undefined or null, the logo is disabled.

logoScale

number?, default: 0.2

Ratio of the logo size to the QR code size.

logoMargin

number?, default: 6

Size of margins around the logo image in pixels.

logoCornerRadius

number?, default: 8

Corner radius of the logo image in pixels.

Sponsors

It is those generous sponsors who supports this project makes the Awesome-qr.js more awesome!

I'd like to express my sincere appreciation to all the generous sponsors.

Since sponsors' names will not show up here without their permissions, the list above only shows a part of all the sponsors. If you wish to have your name shown up here, please feel free to contact me.

Changelog

Check the full changelog

Special thanks

Awesome-qr.js is inspired by EFQRCode by EyreFree.

EFQRCode is a tool to generate QRCode image or recognize QRCode from image, in Swift.

If your application is in need of generating pretty QR codes in Swift, take a look at EFQRCode. It should help.

AwesomeQRCode: Designed for Android

Also, if you are developing Android apps, you can take a look at AwesomeQRCode, which is designed for Android projects.

Other versions

Copyright & License

Awesome-qr.js is licensed under Apache License 2.0 License.

Copyright (c) 2017-2020 Makito

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
jquery-qrcode
Copyright (c) 2011 Jerome Etienne, http://jetienne.com

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
QRCode for JavaScript
Copyright (c) 2009 Kazuhiko Arase
URL: http://www.d-project.com/
Licensed under the MIT license:
    http://www.opensource.org/licenses/mit-license.php
The word "QR Code" is registered trademark of
DENSO WAVE INCORPORATED
    http://www.denso-wave.com/qrcode/faqpatent-e.html
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].