0.0.2 ā€¢ Published 4 years ago

qrcc-pack v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

QRCC Pack

Package for generating QR code.

NPM downloads npm bundle size Build Status JavaScript Style Guide

šŸŽ Features

  • Render as Canvas & Image
  • Support Numeric, Alphanumeric, Kanji and Byte mode
  • Support Japanese, Chinese, Greek and Cyrillic characters
  • Support multibyte characters (like emojis smile)

šŸ”§ Install

qrcc-pack is available on npm. It can be installed with the following command:

npm install @tecnobert/qrcc-pack

qrcc-pack is available on yarn as well. It can be installed with the following command:

yarn add @tecnobert/qrcc-pack

šŸ’” Canvas

usage

import React from "react";
import { useQRCC } from "qrcc-pack";

function App() {
  const [inputRef] = useQRCC({
    text: "https://github.com/tecnobert/qrcc-pack",
    options: {
      level: "M",
      margin: 7,
      scale: 1,
      width: 200,
      color: {
        dark: "#010599FF",
        light: "#FFBF60FF",
      },
    },
  });

  return <canvas ref={inputRef} />;
}

export default App;

parameters

options

šŸ’” Image

usage

import React from "react";
import { useQRCC } from "qrcc-pack";

function App() {
  const [inputRef] = useQRCC({
    text: "https://github.com/tecnobert/qrcc-pack",
    options: {
      type: "image/jpeg",
      quality: 0.3,
      level: "M",
      margin: 3,
      scale: 4,
      width: 200,
      color: {
        dark: "#010599FF",
        light: "#FFBF60FF",
      },
    },
  });

  return <img ref={inputRef} />;
}

export default App;

parameters

options

āš–ļø License

The MIT License License: MIT

0.0.2

4 years ago

0.0.1

4 years ago