Gathering detailed insights and metrics for @frex/easyqrcodejs
Gathering detailed insights and metrics for @frex/easyqrcodejs
Gathering detailed insights and metrics for @frex/easyqrcodejs
Gathering detailed insights and metrics for @frex/easyqrcodejs
easyqrcodejs
Cross-browser QRCode generator for pure javascript. Support Canvas, SVG and Table drawing methods. Support Dot style, Logo, Background image, Colorful, Title etc. settings. Support Angular, Vue.js, React, Next.js, Svelte framework. Support binary(hex) dat
easyqrcodejs-nodejs
NodeJS QRCode generator. Can save image or svg to file, get standard base64 image data url text or get SVG serialized text. Cross-browser QRCode generator for pure javascript. Support Dot style, Logo, Background image, Colorful, Title etc. settings. suppo
easyqrcode-react-native
React Native QRCode generation component. Can get standard base64 image data url text or save image to file. Cross-browser QRCode generator for pure javascript. Support Dot style, Logo, Background image, Colorful, Title etc. settings. support binary mode.
@areta-hackaton/frex-client
Typescript Client to interact with the frex program on Solana.
npm install @frex/easyqrcodejs
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
43 Commits
1 Forks
1 Branches
1 Contributors
Updated on 01 Jun 2020
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
0%
13
Compared to previous day
Last week
-2.7%
36
Compared to previous week
Last month
7%
152
Compared to previous month
Last year
20.3%
1,848
Compared to previous year
4
EasyQRCodeJS is a feature-rich cross-browser pure JavaScript QRCode generation library. Support for Javascript modules. Support setting Dot style, Logo, Background image, Colorful, Title and more.
EasyQRCodeJS 是一个功能丰富的跨浏览器的纯 JavaScript QRCode 生成库。支持 JavaScript 模块化加载。支持点状风格,Logo,背景图片,规则色彩控制,标题等设置。
Project | Support |
---|---|
EasyQRCodeJS | Running with DOM on CLIENT-SIDE . Browser(IE6+, Chrome, Firefox, Safari, Opera, Mobile Safari, Android, Windows Mobile, ETC.), Electron, NW.js, ETC. |
EasyQRCodeJS-NodeJS | Running without DOM on SERVER-SIDE. Save image to file or get data url text. NodeJS, Electron, NW.js, ETC. |
English
Cross-browser support for QR code generation based on HTML5 Canvas and Table
Required Patterns that support dot style
Support for Quiet Zone settings
Support custom Position Pattern inner fill and outer border color
Support custom Alignment Pattern inner fill and outer border color
Support custom Timing Patterns vertical, horizontal color
Support Logo images (including transparent PNG images)
Support Background Image
Support for title, subtitle settings
Has no dependencies
Support AMD, CMD, CommonJS/Node.js JavaScript modules
Angular, Vue.js, React Support
中文
跨浏览器,支持基于 HTML5 Canvas 和 Table 的二维码生成
支持点形风格的 Required Patterns
支持 Quiet Zone 设置
支持自定义 Position Pattern 内填充和外边框颜色
支持自定义 Alignment Pattern 内填充和外边框颜色
支持自定义 Timing Patterns 垂直,水平颜色
支持 Logo 图片(包括背景透明的 PNG 图片)
支持 Background Image 背景图片
支持标题,副标题设置
不依赖任何第三方
支持 AMD,CMD, CommonJS/Node.js JavaScript 模块加载规范
Angular, Vue.js, React 支持
Download install
1<script src="dist/easy.qrcode.min.js" type="text/javascript" charset="utf-8"></script> 2
Npm install
1npm install easyqrcodejs
1<div id="qrcode"></div> 2 3<script type="text/javascript"> 4 // Options 5 var options = { 6 text: "https://github.com/ushelp/EasyQRCodeJS" 7 }; 8 9 // Create QRCode Object 10 new QRCode(document.getElementById("qrcode"), options); 11</script>
AMD load
1require.config({ 2 paths: { 3 QRCode: "<YOUR_PATH>/easy.qrcode.min" 4 } 5}); 6 7require(["QRCode"], function(QRCode){ 8 9 // Your code... 10 11});
Node.js load(For Example, Use in Electron)
1const QRCode = require('easyqrcodejs'); 2 3// Your code...
1var qrcode = new QRCode(DOM_object, options_object);
Options
1 var options_object = { 2 // ====== Basic 3 text: "https://github.com/ushelp/EasyQRCodeJS", 4 width: 256, 5 height: 256, 6 colorDark : "#000000", 7 colorLight : "#ffffff", 8 correctLevel : QRCode.CorrectLevel.H, // L, M, Q, H 9 dotScale: 1, // Must be greater than 0, less than or equal to 1. default is 1 10 dotShape: "Square" // "Square", "Round" 11 12 // ====== Quiet Zone 13 /* 14 quietZone: 0, 15 quietZoneColor: 'transparent', 16 */ 17 18 // ====== Logo 19 /* 20 logo:"../demo/logo.png", // Relative address, relative to `easy.qrcode.min.js` 21 logo:"http://127.0.0.1:8020/easy-qrcodejs/demo/logo.png", 22 logoWidth:80, // widht. default is automatic width 23 logoHeight:80 // height. default is automatic height 24 logoBackgroundColor:'#fffff', // Logo backgroud color, Invalid when `logBgTransparent` is true; default is '#ffffff' 25 logoBackgroundTransparent:false, // Whether use transparent image, default is false 26 */ 27 28 // ====== Backgroud Image 29 /* 30 backgroundImage: '', // Background Image 31 backgroundImageAlpha: 1, // Background image transparency, value between 0 and 1. default is 1. 32 autoColor: false, 33 */ 34 35 // ====== Colorful 36 // === Posotion Pattern(Eye) Color 37 /* 38 PO: '#e1622f', // Global Posotion Outer color. if not set, the defaut is `colorDark` 39 PI: '#aa5b71', // Global Posotion Inner color. if not set, the defaut is `colorDark` 40 PO_TL:'', // Posotion Outer color - Top Left 41 PI_TL:'', // Posotion Inner color - Top Left 42 PO_TR:'', // Posotion Outer color - Top Right 43 PI_TR:'', // Posotion Inner color - Top Right 44 PO_BL:'', // Posotion Outer color - Bottom Left 45 PI_BL:'', // Posotion Inner color - Bottom Left 46 */ 47 // === Alignment Color 48 /* 49 AO: '', // Alignment Outer. if not set, the defaut is `colorDark` 50 AI: '', // Alignment Inner. if not set, the defaut is `colorDark` 51 */ 52 // === Timing Pattern Color 53 /* 54 timing: '#e1622f', // Global Timing color. if not set, the defaut is `colorDark` 55 timing_H: '', // Horizontal timing color 56 timing_V: '', // Vertical timing color 57 */ 58 59 // ====== Title 60 /* 61 title: 'QR Title', // content 62 titleFont: "bold 18px Arial", //font. default is "bold 16px Arial" 63 titleColor: "#004284", // color. default is "#000" 64 titleBackgroundColor: "#fff", // background color. default is "#fff" 65 titleHeight: 70, // height, including subTitle. default is 0 66 titleTop: 25, // draws y coordinates. default is 30 67 */ 68 69 // ====== SubTitle 70 /* 71 subTitle: 'QR subTitle', // content 72 subTitleFont: "14px Arial", // font. default is "14px Arial" 73 subTitleColor: "#004284", // color. default is "4F4F4F" 74 subTitleTop: 40, // draws y coordinates. default is 0 75 */ 76 77 // ===== Event Handler 78 /* 79 onRenderingStart: undefined, 80 onRenderingEnd: undefined, 81 */ 82 83 // ===== Versions 84 /* 85 version: 0, // The symbol versions of QR Code range from Version 1 to Version 40. default 0 means automatically choose the closest version based on the text length. 86 */ 87 88 // ===== Tooltip 89 /* 90 tooltip: false // Whether set the QRCode Text as the title attribute value of the QRCode div 91 */ 92}
Option | Required | Type | Defaults | Description | Compatibility |
---|---|---|---|---|---|
Basic options | --- | --- | --- | --- | --- |
text | Y | String | '' | Text | |
width | N | Number | 256 | Width | |
height | N | Number | 256 | Height | |
colorDark | N | String | #000000 | Dark CSS color, transparent | |
colorLight | N | String | #ffffff | Light CSS color, transparent | |
correctLevel | N | Enum | QRCode.CorrectLevel.H | QRCode.CorrectLevel.H QRCode.CorrectLevel.Q QRCode.CorrectLevel.M QRCode.CorrectLevel.L | |
dotScale | N | Number | 1.0 | Dot style required Patterns. Ranges: 0-1.0 | |
Quiet Zone | --- | --- | --- | --- | --- |
quietZone | N | Number | 0 | Quiet Zone size | |
quietZoneColor | N | String | transparent | Background CSS color to Quiet Zone | |
Logo options | --- | --- | --- | --- | --- |
logo | N | String | undefined | Logo Image Path or Base64 encoded image. If use relative address, relative to easy.qrcode.min.js | |
logoWidth | N | Number | undefined | Height | |
logoHeight | N | Number | undefined | Width | |
logoBackgroundTransparent | N | Boolean | false | Whether the background transparent image(PNG ) shows transparency. When true , logoBackgroundColor is invalid | |
logoBackgroundColor | N | String | #ffffff | Set Background CSS Color when image background transparent. Valid when logoBackgroundTransparent is false | |
Backgroud Image options | --- | --- | --- | --- | --- |
backgroundImage | N | String | undefined | Background Image Path or Base64 encoded Image. If use relative address, relative to easy.qrcode.min.js | |
backgroundImageAlpha | N | Number | 1.0 | Background image transparency. Ranges: 0-1.0 | |
autoColor | N | Boolean | false | Automatic color adjustment | |
Posotion Pattern Color options | --- | --- | --- | --- | --- |
PO | N | String | undefined | Global Posotion Outer CSS color. if not set, the defaut is colorDark | |
PI | N | String | undefined | Global Posotion Inner CSS color. if not set, the defaut is colorDark | |
PO_TL | N | String | undefined | Posotion Outer CSS color - Top Left | |
PI_TL | N | String | undefined | Posotion Inner CSS color - Top Left | |
PO_TR | N | String | undefined | Posotion Outer CSS color - Top Right | |
PI_TR | N | String | undefined | Posotion Inner CSS color - Top Right | |
PO_BL | N | String | undefined | Posotion Outer CSS color - Bottom Left | |
PI_BL | N | String | undefined | Posotion Inner CSS color - Bottom Left | |
Alignment Color options | --- | --- | --- | --- | --- |
AO | N | String | undefined | Alignment Outer CSS color. if not set, the defaut is colorDark | |
AI | N | String | undefined | Alignment Inner CSS color. if not set, the defaut is colorDark | |
Timing Pattern Color options | --- | --- | --- | --- | --- |
timing | N | String | undefined | Global Timing CSS color. if not set, the defaut is colorDark | |
timing_H | N | String | undefined | Horizontal timing CSS color | |
timing_V | N | String | undefined | Vertical timing CSS color | |
Title options | --- | --- | --- | --- | --- |
title | N | String | '' | ||
titleFont | N | String | bold 16px Arial | CSS Font | |
titleColor | N | String | #000000 | CSS color | |
titleBackgroundColor | N | String | #ffffff | CSS color | |
titleHeight | N | Number | 0 | Title Height, Include subTitle | |
titleTop | N | Number | 30 | draws y coordinates. | |
SubTitle options | --- | --- | --- | --- | --- |
subTitle | N | String | '' | ||
subTitleFont | N | String | 14px Arial | CSS Font | |
subTitleColor | N | String | #4F4F4F | CSS color | |
subTitleTop | N | Number | 0 | draws y coordinates. default is 0 | |
Event Handler options | --- | --- | --- | --- | --- |
onRenderingStart(qrCodeOptions) | N | Function | undefined | Callback function when the rendering start. can use to hide loading state or handling. | |
onRenderingEnd(qrCodeOptions, base64DataURL) | N | Function | undefined | Callback function when the rendering ends. base64DataURL parameter is the base64 data of QRCode image(if not support canvas return null ). | |
Version options | --- | --- | --- | --- | |
version | N | Number | 0 | The symbol versions of QR Code range from Version 1 to Version 40 . default 0 means automatically choose the closest version based on the text length. Information capacity and versions of QR Codes NOTE: If you set a value less than the minimum version available for text, the minimum version is automatically used. | |
Tooltip options | --- | --- | --- | --- | |
tooltip | N | Boolean | false | Whether set the QRCode Text as the title attribute value of the QRCode div. |
clear()
1qrcode.clear(); // remove the code.
makeCode(text)
1qrcode.makeCode("https://github.com/ushelp/EasyQRCodeJS"); // make another code text.
resize(widht, height)
1qrcode.resize(480, 480); // Resize the image
Add dependency
1# install with `npm` 2npm install --save easyqrcodejs 3 4# Alternatively you may use `yarn`: 5yarn add easyqrcodejs
[NAME].component.html
1<!-- DOM Element--> 2<div #qrcode></div>
[NAME].component.ts
1import { Component, AfterViewInit, ElementRef, ViewChild } from '@angular/core';
2import * as QRCode from 'easyqrcodejs';
3
4@Component({
5 selector: 'app-root',
6 templateUrl: './app.component.html',
7 styleUrls: ['./app.component.css']
8})
9export class AppComponent implements AfterViewInit{
10
11 // Your DOM Element
12 @ViewChild('qrcode', {static: false}) qrcode: ElementRef;
13
14 ngAfterViewInit(){
15
16 // Options
17 var options = {
18 text: "https://github.com/ushelp/EasyQRCodeJS"
19 }
20
21 // Create new QRCode Object
22 new QRCode(this.qrcode.nativeElement, options);
23
24 }
25
26 btnClick(){
27 // ....
28 }
29
30}
Add dependency
1# install with `npm` 2npm install --save easyqrcodejs 3 4# Alternatively you may use `yarn`: 5yarn add easyqrcodejs
Template
1<!-- DOM Element--> 2<div ref="qrcode></div>
Script
1<script> 2import * as QRCode from 'easyqrcodejs' 3 4export default { 5 6 mounted(){ 7 // Options 8 var options = { 9 text: "https://github.com/ushelp/EasyQRCodeJS" 10 } 11 12 // Create new QRCode Object 13 new QRCode(this.$refs.qrcode, options); 14 }, 15 methods:{ 16 btnClick(){ 17 18 } 19 } 20} 21</script>
Add dependency
1# install with `npm` 2npm install --save easyqrcodejs 3 4# Alternatively you may use `yarn`: 5yarn add easyqrcodejs
Script
1import React from 'react'; 2import './App.css'; 3import * as QRCode from 'easyqrcodejs'; 4 5class App extends React.Component { 6 7 constructor(props) { 8 super(props); 9 this.qrcode = React.createRef(); 10 } 11 12 componentDidMount() { 13 // Options 14 var options = { 15 text: "https://github.com/ushelp/EasyQRCodeJS" 16 } 17 // Create new QRCode Object 18 new QRCode( this.qrcode.current, options); 19 } 20 render() { 21 return ( 22 <div className = "App"> 23 <div ref={this.qrcode}></div> 24 </div> 25 ); 26 } 27} 28 29export default App;
IE6+, Chrome, Firefox, Safari, Opera, Mobile Safari, Android, Windows Mobile, ETC.
MIT License
With EasyQRCodeJS-Premium you can use Canvas to customize any element, Such as Eye frame sharp, Eye ball sharp, QR Body block sharp, etc.
If you need more functions, we can provide you with customized development of API libraries or products. please contact me to buy.
EasyQRCodeJS-Premium 让您可以在 QRCode 中通过 Canvas 自定义任何喜欢的元素,例如 Eye frame sharp, Eye ball sharp, QR Body block sharp 等等。
如果您需要更多功能,我们可以为您提供 API 库或产品的定制开发。请联系我购买。
Email:inthinkcolor@gmail.com
Donation/捐助:
我们相信,每个人的点滴贡献,都将是推动产生更多、更好免费开源产品的一大步。
感谢慷慨捐助,以支持服务器运行和鼓励更多社区成员。
We believe that the contribution of each bit by bit, will be driven to produce more and better free and open source products a big step.
Thank you donation to support the server running and encourage more community members.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
13 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More