https://github.com/iamchathu/react-jsbarcode
JSBarcode component for modern React.js with types.
https://github.com/iamchathu/react-jsbarcode
barcode barcode-generator hacktoberfest jsbarcode react reactcomponent typescript
Last synced: 3 months ago
JSON representation
JSBarcode component for modern React.js with types.
- Host: GitHub
- URL: https://github.com/iamchathu/react-jsbarcode
- Owner: iamchathu
- License: mit
- Created: 2021-10-07T08:00:48.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2025-10-03T21:58:43.000Z (3 months ago)
- Last Synced: 2025-10-03T23:31:51.678Z (3 months ago)
- Topics: barcode, barcode-generator, hacktoberfest, jsbarcode, react, reactcomponent, typescript
- Language: TypeScript
- Homepage: http://chathu.me/react-jsbarcode/
- Size: 327 KB
- Stars: 18
- Watchers: 4
- Forks: 8
- Open Issues: 15
-
Metadata Files:
- Readme: Readme.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# react-jsbarcode
[](https://www.npmjs.com/package/react-jsbarcode)
[](https://snyk.io/test/github/iamchathu/react-jsbarcode)
[](https://codeclimate.com/github/iamchathu/react-jsbarcode)
[](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)
[](https://raw.githubusercontent.com/iamchathu/react-jsbarcode/master/LICENSE)
[](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.
## Demo
[](https://codesandbox.io/s/react-jsbarcode-2659g?fontsize=14&hidenavigation=1&theme=dark)
[](https://stackblitz.com/edit/react-jsbarcode?file=src%2FApp.tsx)
## Installation
using NPM
```bash
npm i react-jsbarcode
```
using yarn
```bash
yarn add react-jsbarcode
```
using PNPM
```bash
pnpm add react-jsbarcode
```
## Usage
- Basic usage
```tsx
import { ReactBarcode } from 'react-jsbarcode';
const App = () => {
return ;
};
```
- Advanced usage
```tsx
import { ReactBarcode } from 'react-jsbarcode';
const App = () => {
return ;
};
```
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'.
[](https://codesandbox.io/s/react-jsbarcode-2659g?fontsize=14&hidenavigation=1&theme=dark)
[](https://stackblitz.com/edit/react-jsbarcode?file=src%2FApp.tsx)