Skip to content

FidMe/react-native-barcode-builder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@fidme/react-native-barcode-builder

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

Getting started

Step 1

Link React ART; open the Xcode project, and drag ART.xcodeproj from node_modules/react-native/Libraries/ART/ into the Libraries group in Xcode. Then select the root project and select "Build Phases" from the center view. There will be a section called "Link Binary With Libraries", expand it, press the + and select libART.a.

Step 2

Install @fidme/react-native-barcode-builder:

npm install @fidme/react-native-barcode-builder --save

Step 3

Start using the component

import Barcode from "@fidme/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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 51.7%
  • Objective-C 28.6%
  • Starlark 11.2%
  • Java 8.5%