Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

jsbarcode-react

bayyand25MIT0.2.5TypeScript support: included

JSBarcode component for React

react, react-component, barcode, jsbarcode, barcode generator, react barcode

readme

#

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

changelog

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

0.2.4 (2022-03-07)

0.2.3 (2021-10-12)

0.2.3-beta.0 (2021-10-12)

0.2.2 (2021-10-08)

Features

  • add className and style support (cd4d63a)

0.2.1 (2021-10-07)

Bug Fixes

  • make options optional prop (0bc6f4b)

0.2.0 (2021-10-07)

⚠ BREAKING CHANGES

  • move jsbarcode as dependacy rather than peer

Features

  • move jsbarcode as dependacy rather than peer (4730d31)

0.1.2 (2021-10-07)

Bug Fixes

  • readme example and add more details (73c68ca)

0.1.1 (2021-10-07)

Bug Fixes

  • readme react jsx formatting (94a24bf)

0.1.0 (2021-10-07)

⚠ BREAKING CHANGES

  • rename data prop name to value

Bug Fixes

  • formatting of readme (10c6717)
  • readme with peer deps installation (89c7d28)

  • rename data prop name to value (dcfe0df)