1.0.8 • Published 1 year ago

awesome-qr-code-generator v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

awesome-qr-code-generator

Simple QR code generator. Output Svg & Png

Installation

For install npm package inside your project folder do:

npm install --save awesome-qr-code-generator

ES6/ES7

awesome-qr-code-generator can be used in browser through module bundlers like Browserify and Webpack

import { toDataURL, toSvgString } from 'awesome-qr-code-generator';

const svgString = toSvgString(text);
const pngBase64 = toDataURL(text);

API

toSvgString(text, [options])

toDataURL(text, [options])

text

Type: String|Array

Text to encode or a list of objects describing segments.

options

Optional

QR Code options

margin

Type: Number Default: 1

Define how much wide the quiet zone should be.

scale

Type: Number Default: 20

Scale factor. A value of 1 means 1px per modules (black dots). Affects only the quality of PNG

codeColor

Type: String Default: #000000ff

Color of qr code. Value must be in hex format (RGBA).

backgroundColor

Type: String Default: #ffffffff

Background Color. Value must be in hex format (RGBA).

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago