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

pastel-qr-scan

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pastel-qr-scan

Pastel QR Code Scanner & Reader is a component built to scan PSL QR codes using a webcam.

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Pastel QR Code Scanner & Reader


Pastel QR Code Scanner & Reader is a component built to scan PSL QR codes using a webcam.

Installation

You can install this library via NPM or YARN.

NPM

npm i pastel-qr-scan

YARN

yarn add pastel-qr-scan

Example Usage

After reading and performing the previous steps, you should be able to import the library and use it like in this example:

import React, { useState } from 'react';
import { QrReader } from 'pastel-qr-scan';

const Test = (props) => {
  const [data, setData] = useState('No result');

  return (
    <>
      <QrScan
        onResult={(result) => {
          if (result) {
            setData(result?.text);
          }
        }}
      />
      <p>{data}</p>
    </>
  );
};

Component API

The Pastel QR Code Scanner & Reader component has the following props:

PropertiesTypesDefault ValueDescription
onResultfunctionnoneScan event handler
videoWidthstring100%The width for the video element
videoHeightstring100%The height for the video element
classNamestringnoneClassName for the container element.

Issues

Please, open an issue following one of the issues templates. We will do our best to fix them.

License

Distributed under the MIT license. See LICENSE for more information.

Keywords

FAQs

Package last updated on 13 May 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