Socket
Socket
Sign inDemoInstall

react-native-barcode-svg

Package Overview
Dependencies
2
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-barcode-svg

React Native component to generate barcode. Uses @react-native-community/react-native-svg.


Version published
Weekly downloads
1.5K
decreased by-10.16%
Maintainers
1
Install size
1.14 MB
Created
Weekly downloads
 

Readme

Source

react-native-barcode-svg

React Native component to generate barcode, without display text/value.

Uses JsBarcode for encoding of data.

Uses @react-native-community/react-native-svg instead of @react-native-community/art.

Getting started

Step 1

Install react-native-barcode-svg and dependencies:

npm install react-native-barcode-svg react-native-svg
yarn add react-native-barcode-svg react-native-svg

Step 2

Start using the component

import Barcode from 'react-native-barcode-svg';

<Barcode value="Hello World" format="CODE128" />;

Supported formats:

You can find more info about the supported barcode formats (EG.: CODE128, EAN13, EAN8, UPC, ITF, ...) in the:
JsBarcode README
JsBarcode Barcode Generator

Properties

PropertyDescription
valueWhat the barcode stands for (required).
formatWhich barcode type to use (default: CODE128). https://github.com/lindell/JsBarcode/blob/master/src/barcodes/index.js
singleBarWidthWidth of a single bar (default: 2)
maxWidthMax-width of the barcode (default: undefined, no-limitation)
heightHeight of the barcode (default: 100)
lineColorColor of the bars and text (default: #000000)
backgroundColorBackground color of the barcode (default: #FFFFFF)
onErrorHandler for invalid barcode of selected format

Keywords

FAQs

Last updated on 30 May 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc