jsbarcode-react
TypeScript icon, indicating that this package has built-in type declarations

0.2.5 • Public • Published

GitHub license

About

This is a React component wrapping up jsbarcode. Written as a React functional component using React hooks.

This is a component fork of react-jsbarcode

Installation

using NPM

npm i jsbarcode-react

using yarn

yarn add jsbarcode-react

Usage

  • Basic usage
import Barcode from 'jsbarcode-react';

const App = () => {
  return <Barcode value="ABC123" />;
};
  • Advanced usage
import Barcode from 'jsbarcode-react';

const App = () => {
  return <Barcode value="ABC123" options={{ format: 'code128' }} renderer="svg" />;
};

For all options refer jsbarcode wiki.

Renderers

JSBarcode supports rendering to SVG, image and canvas. Default renderer is 'svg'.

Package Sidebar

Install

npm i jsbarcode-react

Weekly Downloads

11

Version

0.2.5

License

MIT

Unpacked Size

786 kB

Total Files

8

Last publish

Collaborators

  • bayyand