0.0.2 ā¢ Published 4 years ago
qrcc-pack v0.0.2
QRCC Pack
Package for generating QR code.
š 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;