Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-qr-code

Package Overview
Dependencies
Maintainers
0
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-qr-code

A QR code generator for React and React Native.

  • 2.0.15
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
494K
decreased by-10.42%
Maintainers
0
Weekly downloads
 
Created

What is react-qr-code?

The react-qr-code npm package is a simple and efficient library for generating QR codes in React applications. It allows developers to easily create QR codes by providing a URL or text string, which can then be rendered as a QR code image in the application.

What are react-qr-code's main functionalities?

Basic QR Code Generation

This feature allows you to generate a basic QR code by providing a URL or text string. The QR code is rendered as an image in the React component.


import React from 'react';
import QRCode from 'react-qr-code';

const App = () => {
  return (
    <div>
      <QRCode value="https://example.com" />
    </div>
  );
};

export default App;

Customizing QR Code Size

This feature allows you to customize the size of the QR code by specifying the 'size' prop. The QR code will be rendered with the specified dimensions.


import React from 'react';
import QRCode from 'react-qr-code';

const App = () => {
  return (
    <div>
      <QRCode value="https://example.com" size={256} />
    </div>
  );
};

export default App;

Customizing QR Code Colors

This feature allows you to customize the foreground and background colors of the QR code by specifying the 'fgColor' and 'bgColor' props.


import React from 'react';
import QRCode from 'react-qr-code';

const App = () => {
  return (
    <div>
      <QRCode value="https://example.com" fgColor="#0000ff" bgColor="#ffffff" />
    </div>
  );
};

export default App;

Other packages similar to react-qr-code

Keywords

FAQs

Package last updated on 20 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc