Git Product home page Git Product logo

vittoridavide / react-native-barcode-creator Goto Github PK

View Code? Open in Web Editor NEW
19.0 2.0 8.0 708 KB

React Native Barcode Creator creates different type of barcodes including EAN13, CODE128, PDF417, UPCA, QR and AZTEC.

License: MIT License

Java 44.67% JavaScript 3.75% TypeScript 5.40% C 0.26% Objective-C 9.30% Swift 33.51% Ruby 3.12%
react-native barcode barcode-generator qrcode-generator native

react-native-barcode-creator's Introduction

Natively Generate Barcodes with React Native

  • react-native-barcode-creator is a React Native library designed for native generation of QR Codes, Code128, PDF417, AZTEC, EAN-13, and UPC-A.

Installation

React Native

yarn add react-native-barcode-creator
cd ios && pod install

Expo

npx expo install react-native-barcode-creator
npx expo prebuild

remember to use the Development Build and not Expo Go

Usage

Props

Prop Description Default
value Mandatory - The content to add to the Barcode. (EAN-13 should be 13 integers on a string like "5901234123457", UPCA has to be 12 characters "590123412345") None
encodedValue Use instead of value, accepts object with base64 and messageEncoded. MessageEncoded only accepts "ISO-8859-1", "UTF-8", "UTF-16". Ex: {base64: "", messageEncoded: ""} None
style Style attributes for the view, as expected in a standard View. None
format Mandatory The format to show in the Barcode, it can be QR, AZTEC, PDF417, CODE128, EAN13 and UPCA. BarcodeFormat.QR
background The Background Color of the Barcode. (rgba or rgb) #FFFFFF
foregroundColor The foreground color to use on the Barcode. (rgba or rgb)

Example

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

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

Screenshots

alt text

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.