react-native-barcode-creator
v0.2.0
Published
Component to generate QRCode, Code128, PDF417, AZTEC, EAN-13 and UPC-A natively for react native.
Readme
Getting Started
yarn add react-native-barcode-creator
cd ios && pod installnpx expo install react-native-barcode-creator
npx expo prebuildRequires 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
