antonigiske / react-native-barcode-builder

Component for generating barcode in react native app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-barcode-builder

React Native component to generate barcodes. Uses JsBarcode for encoding of data.

Getting started

This library uses @react-native-community/react-native-svg instead of @react-native-community/art

Step 1

Install react-native-barcode-builder:

npm install react-native-barcode-builder --save

or

yarn add react-native-barcode-builder

Step 2

Start using the component

import Barcode from 'react-native-barcode-builder';

<Barcode value="Hello World" format="CODE128" />

You can find more info about the supported barcodes in the JsBarcode README.

Properties

Property Description
value What the barcode stands for (required).
format Which barcode type to use (default: CODE128).
width Width of a single bar (default: 2)
height Height of the barcode (default: 100)
text Override text that is displayed.
lineColor Color of the bars and text (default: #000000)
background Background color of the barcode (default: #ffffff)
onError Handler for invalid barcode of selected format

About

Component for generating barcode in react native app

License:Other


Languages

Language:JavaScript 51.5%Language:Objective-C 28.7%Language:Python 11.2%Language:Java 8.6%