You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-native-barcode-svg

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

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.

0.0.15
latest
Source
npmnpm
Version published
Weekly downloads
7.1K
5.83%
Maintainers
1
Weekly downloads
 
Created
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

react-native

FAQs

Package last updated on 30 May 2020

Did you know?

Socket

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