# jsbarcode-react

> JSBarcode component for React

Latest version **0.2.5** (published 2022-06-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install jsbarcode-react
pnpm add jsbarcode-react
yarn add jsbarcode-react
bun add jsbarcode-react
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.5 |
| Published | 2022-06-09 |
| First published | 2022-06-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 767.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Chathu Vishwajith |
| Maintainers | bayyand |
| Keywords | react, react-component, barcode, jsbarcode, barcode generator, react barcode |

## Links

- npm: https://www.npmjs.com/package/jsbarcode-react
- Repository: https://github.com/bayyand/react-jsbarcode
- Issues: https://github.com/bayyand/react-jsbarcode/issues
- npm.io page: https://npm.io/package/jsbarcode-react

## Dependencies (1)

- [jsbarcode](https://npm.io/package/jsbarcode.md) ^3.11.5

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.2.5 (latest) — 2022-06-09

## README

# react-jsbarcode

[![npm](https://img.shields.io/npm/v/react-jsbarcode.svg)](https://www.npmjs.com/package/react-jsbarcode)
[![Known Vulnerabilities](https://snyk.io/test/github/iamchathu/react-jsbarcode/badge.svg)](https://snyk.io/test/github/iamchathu/react-jsbarcode)
[![Code Climate](https://codeclimate.com/github/iamchathu/react-jsbarcode/badges/gpa.svg)](https://codeclimate.com/github/iamchathu/react-jsbarcode)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/1327fdb350f84fc7b3dded573c983892)](https://www.codacy.com/gh/iamchathu/react-jsbarcode/dashboard?utm_source=github.com&utm_medium=referral&utm_content=iamchathu/react-jsbarcode&utm_campaign=Badge_Grade)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/iamchathu/react-jsbarcode/master/LICENSE)
[![Twitter](https://img.shields.io/twitter/url/https/github.com/iamchathu/react-jsbarcode.svg?style=social)](https://twitter.com/intent/tweet?text=Barcode+for+react&url=https%3A%2F%2Fgithub.com%2Fiamchathu%2Freact-jsbarcode)

## About

This is a [React](https://reactjs.org) component wrapping up [jsbarcode](<[https://](https://github.com/lindell/JsBarcode)>). Written as a React functional component using React hooks. <ReactBarcode />

## CodeSandbox Demo

[![Edit react-jsbarcode](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/react-jsbarcode-2659g?fontsize=14&hidenavigation=1&theme=dark)

## Installation

using NPM

```bash
npm i react-jsbarcode
```

using yarn

```bash
yarn add react-jsbarcode
```

## Usage

- Basic usage

```tsx
import Barcode from 'react-jsbarcode';

const App = () => {
  return <Barcode value="ABC123" />;
};
```

- Advanced usage

```tsx
import Barcode from 'react-jsbarcode';

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

For all options refer jsbarcode [wiki](https://github.com/lindell/JsBarcode/wiki/Options).

### Renderers

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

[![Edit react-jsbarcode](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/react-jsbarcode-2659g?fontsize=14&hidenavigation=1&theme=dark)

---
_Source: https://npm.io/package/jsbarcode-react · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
