iamchathu / react-jsbarcode

JSBarcode component for modern React.js with types.

Home Page:http://chathu.me/react-jsbarcode/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-jsbarcode

npm Known Vulnerabilities Code Climate Codacy Badge GitHub license Twitter

About

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

Demo

Edit react-jsbarcode Open in StackBlitz

Installation

using NPM

npm i react-jsbarcode

using yarn

yarn add react-jsbarcode

using PNPM

pnpm add react-jsbarcode

Usage

  • Basic usage
import { ReactBarcode } from 'react-jsbarcode';

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

const App = () => {
  return <ReactBarcode 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'.

Edit react-jsbarcode Open in StackBlitz

About

JSBarcode component for modern React.js with types.

http://chathu.me/react-jsbarcode/

License:MIT License


Languages

Language:TypeScript 97.1%Language:HTML 2.9%