ember-cli-barcode

1.1.0 • Public • Published

Latest NPM release ci workflow License Ember Observer Score

ember-cli-barcode

An Ember addon to render barcodes using the JsBarcode library. See the demo to experiment with many of the barcode options.

The addon adds accessibility attributes and elements to the generated barcodes. See the Accessibility section below.

Compatibility

  • Ember.js v3.12 or above
  • Ember CLI v2.13 or above
  • Embroider safe and optimized
  • Node.js v10 or above

Installation

  $ ember install ember-cli-barcode

By default all barcode types are added to your app. See the build configuration section for slimming your build

Simple Usage

To render a barcode provide the barcode value and the default options will generate a CODE128 barcode:

<BarCode @value="abc123456" />

which renders:

alt text

By default, barcodes are rendered using the svg element. The element can be changed to img or canvas using the tagName property:

<BarCode
  @value="A45689"
  @tagName="img"
/>

<BarCode
  value="A45689"
  tagName="canvas"
/>

Use the img tag if you want the ability to right-click copy or save the displayed barcode.

See the Options readme for detailed barcode options.

See the Contributing guide for details.

Package Sidebar

Install

npm i ember-cli-barcode

Weekly Downloads

121

Version

1.1.0

License

MIT

Unpacked Size

22.7 kB

Total Files

11

Last publish

Collaborators

  • gmartell