Giter VIP home page Giter VIP logo

react-jsbarcode's Introduction

react-jsbarcode

npm Known Vulnerabilities Code Climate Codacy Badge GitHub license Twitter

About

This is a React component wrapping up jsbarcode. Written as a React functional component using React hooks.

CodeSandbox Demo

Edit react-jsbarcode

Installation

using NPM

npm i react-jsbarcode

using yarn

yarn add react-jsbarcode

using PNPM

pnpm add react-jsbarcode

Usage

  • Basic usage
import Barcode from 'react-jsbarcode';

const App = () => {
  return <Barcode value="ABC123" />;
};
  • Advanced usage
import Barcode from 'react-jsbarcode';

const App = () => {
  return <Barcode value="ABC123" options={{ format: 'code128' }} renderer="svg" />;
};

For all options refer jsbarcode wiki.

Renderers

JSBarcode supports rendering to SVG, image and canvas. Default renderer is 'svg'.

Edit react-jsbarcode

react-jsbarcode's People

Contributors

iamchathu avatar semantic-release-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-jsbarcode's Issues

Setup tests

Project needs snapshot testing and other tests to be setup.

Jest and @testing-libary/react will be good tools.

Compilation warning/error

Hello,

Thanks for the fix from react-barcode, but now I'm getting this after each compilation :

WARNING in ./node_modules/react-jsbarcode/lib/index.esm.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'E:\Projets\ExterieurStock\reactjs-logistique\node_modules\react-jsbarcode\src\index.tsx' file: Error: ENOENT: no such file
or directory, open 'E:\Projets\ExterieurStock\reactjs-logistique\node_modules\react-jsbarcode\src\index.tsx'

Any advice on how to fix it ?

Edit: I found this, maybe it can help you to fix it (facebook/create-react-app#11767)

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.