Skip to content

Repository files navigation


RNBC

Barcode Creator


new architecture npm downloads license

Native barcode generation for React Native

QR · Code128 · PDF417 · AZTEC · EAN-13 · UPC-A


Supported formats

Getting Started

React Native CLI
yarn add react-native-barcode-creator
cd ios && pod install
Expo
npx expo install react-native-barcode-creator
npx expo prebuild

Requires a Development Build — Expo Go is not supported.

Usage

import { BarcodeCreatorView, BarcodeFormat } from "react-native-barcode-creator";

<BarcodeCreatorView
  value={"Hello World"}
  background={"#FFFFFF"}
  foregroundColor={"#000000"}
  format={BarcodeFormat.AZTEC}
  style={styles.box}
/>

Props

Prop Type Required Default Description
value string * Content to encode. EAN-13 expects 13 digits, UPC-A expects 12.
encodedValue { base64, messageEncoded } Alternative to value. Encoding: ISO-8859-1, UTF-8, UTF-16.
format BarcodeFormat * QR QR · AZTEC · PDF417 · CODE128 · EAN13 · UPCA
style ViewStyle Standard View style.
background string #FFFFFF Background color (rgb/rgba).
foregroundColor string #000000 Foreground color (rgb/rgba).

Contributing

See the contributing guide.

License

MIT

About

RNBC creates different type of barcodes including EAN13, CODE128, PDF417, UPCA, QR and AZTEC.

Topics

Resources

Contributing

Stars

46 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages