2.3.0 • Published 3 months ago

qrcode-gen-custom v2.3.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

Custom QR Code Generator

Generate QR codes easily with this simple QR code generator library for JavaScript.

Installation

Install the library using npm:

npm install qrcode-gen-custom

Usage

Import the library const generateQRCode = require('qrcode-gen-custom');

Define the link you want to generate a QR code for const link = 'https://example.com';

Generate the QR code URL const qrCodeURL = generateQRCode(link);

Use the generated QR code URL as needed console.log('QR Code URL:', qrCodeURL);

API

generateQRCode(link: string): string Generates a QR code URL for the given link.

link (string): The URL or text for which the QR code will be generated.

Returns a string representing the QR code URL

Example in React

Assuming you have the library installed, here's how you can use it in a React functional component:

import React from 'react';
import generateQRCode from 'qrcode-gen-custom';

const MyComponent = () => {
  const link = 'https://example.com';
  const qrCodeURL = generateQRCode(link);

  return (
    <div>
      <h1>QR Code Generator</h1>
      <img src={qrCodeURL} alt="QR Code" />
    </div>
  );
};

export default MyComponent;

Contributing

Feel free to contribute to this project by opening issues or creating pull requests.

License

This project is licensed under the MIT License - see the LICENSE file for details

Author

Abhijeet Tyagi

2.3.0

3 months ago

1.2.0

4 months ago

2.2.0

4 months ago

1.1.0

4 months ago

2.1.0

4 months ago

2.0.0

4 months ago

1.3.0

4 months ago

1.0.1

4 months ago