Barcode Creator
Native barcode generation for React Native
QR · Code128 · PDF417 · AZTEC · EAN-13 · UPC-A
React Native CLI
yarn add react-native-barcode-creator
cd ios && pod installExpo
npx expo install react-native-barcode-creator
npx expo prebuildRequires a Development Build — Expo Go is not supported.
import { BarcodeCreatorView, BarcodeFormat } from "react-native-barcode-creator";
<BarcodeCreatorView
value={"Hello World"}
background={"#FFFFFF"}
foregroundColor={"#000000"}
format={BarcodeFormat.AZTEC}
style={styles.box}
/>| 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). |
See the contributing guide.
MIT
