Giter Club home page Giter Club logo

qrcode-generator's Introduction

React Easy QR-Code Generator

Easilty generate QR code from any text or url. It is based on QR Server API.

๐Ÿ’ก Features

  • Generate QR code for any text and url.
  • Small and lightweight.
  • Works on all platforms Web, Android and iOS.

๐Ÿ”ง Installation

npm i react-easy-qrcode-generator    # npm
yarn add react-easy-qrcode-generator # yarn

๐Ÿ–ฅ๏ธ Example

Try with CodeSandbox

๐Ÿ–ฅ๏ธ Preview

Web

๐Ÿ“ฆ Usage

import React, { useState } from "react";
import { qrcodeGenerator } from "react-easy-qrcode-generator";

export default function App() {
  const [value, setValue] = useState("");
  return (
    <div className="App">
      <input value={value} onChange={(e) => setValue(e.target.value)} />
      <button
        onClick={() =>
          qrcodeGenerator({
            value: value,
            size: "180x180",
            title: "Title",
            qrAlt: "QR Code Image",
            showQrId: "qr-code",
          })
        }
      >
        Generator QR
      </button>
      <div id="qr-code" />
    </div>
  );
}

๐Ÿ‘€ API References

Functions

  qrcodeGenerator({value, size, title, qrAlt, showQrId})

Takes the following parameters:

Parameter Type Default value Description
value string null Required
size string 180x180 Optional
title string React easy QR generator Optional
qrAlt string React easy QR image Optional
showQrId string null Required
color string 0-0-0 Optional
bgcolor string 255-255-255 Valid examples for color and bgcolor: 255-0-0 (red),f00 (red), FF0000 (red), 0-255-0 (green), 0f0 (green), 00ff00 (green), 0-0-255 (blue), 00f (blue), 0000ff (blue), 556B2F (DarkOliveGreen) Optional

๐Ÿ“œ License

MIT

qrcode-generator's People

Contributors

mukesh-est avatar rkencoresky avatar sanjayest avatar sejal-verma-official avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

qrcode-generator's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.