Socket
Socket
Sign inDemoInstall

react-hooks-barcode

Package Overview
Dependencies
9
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-hooks-barcode

React component for generating barcodes


Version published
Weekly downloads
570
increased by1.97%
Maintainers
1
Install size
1.65 MB
Created
Weekly downloads
 

Readme

Source

react-hooks-barcode

Open Source Love

NPM version npm download last commit Repo size Github Top Language

Super easy barcode generation for ReactJS.

This package uses JsBarcode

Alt Text

Install

Note: Make sure that you have installed the correct version of react(>= v16.8.0) and react-dom(>= v16.8.0).

npm

npm install --save react-hooks-barcode

yarn

yarn add react-hooks-barcode

Demo

Example    Live Demo

Usage

import Barcode

import Barcode from "react-hooks-barcode";

Get barcode with value

<Barcode value="https://reactjs.org/" />

Configuring Options

const config = {
  background: "#f5f5f5",
  marginTop: "20px",
  marginBottom: "20px",
  fontOptions: "italic",
  width: 2
};

<Barcode value="https://reactjs.org/" {...config} />;

Available Options

Refer to JsBarcode options wiki page for more information

{
  width: 2,
  height: 100,
  format: "CODE128",
  displayValue: true,
  fontOptions: "",
  font: "monospace",
  textAlign: "center",
  textPosition: "bottom",
  textMargin: 2,
  fontSize: 20,
  background: "#ffffff",
  lineColor: "#000000",
  margin: 10,
  marginTop: undefined,
  marginBottom: undefined,
  marginLeft: undefined,
  marginRight: undefined
}

Contribution

Make a PR

PRs Welcome

Development

Node >= v8 LTS

  • Clone the project to local disk
  • npm install
  • npm start

License

MIT Licence

Keywords

FAQs

Last updated on 05 Mar 2019

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