rileymiller / barcy

A modern React Component for reading USB Barcode Scanners

Home Page:https://barcy.fyko.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Barcy

A modern React Component for reading USB Barcode Scanners

Example

import * as React from 'react';
import * as ReactDOM from 'react-dom';
import Barcy from 'barcy';

const App = () => {
  const [value, setValue] = React.useState('');

  return (
    <>
      <Barcy onScan={(str) => setValue(str)} />
      <p>Scanned value: {value}</p>
    </>
  );
};

ReactDOM.render(<App />, document.getElementById('root'));

Documentation

todo

Development

  1. yarn

Install dependencies.

  1. yarn dev

Build the component, then start the demo site

  1. Focus the demo site, and use your barcode scanner.

Regards

This package is a modern version of https://github.com/kybarg/react-barcode-reader

About

A modern React Component for reading USB Barcode Scanners

https://barcy.fyko.net

License:MIT License


Languages

Language:TypeScript 95.6%Language:HTML 2.8%Language:JavaScript 1.6%