0.2.5 • Published 2 years ago

jsbarcode-react v0.2.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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'.