vue-barcode v2.0.2

Bar code component for Vue 3.

Bar Code

Easy to use bar code component, bases on JsBarcode.

Basic usage

<template>
  <vue-barcode value="Hello, World!"></vue-barcode>
  <vue-barcode value="1234567890"></vue-barcode>
</template>

Add options

<template>
  <vue-barcode value="1234567890"></vue-barcode>
  <vue-barcode value="1234567890" :options="{ lineColor: '#007bff' }"></vue-barcode>
</template>

Custom tag

1234567890
<template>
  <vue-barcode value="1234567890" tag="img"></vue-barcode>
  <vue-barcode value="1234567890" tag="svg"></vue-barcode>
</template>

Props

NameTypeDefaultOptionsDescription
valuestring--The value of the bar code.
optionsObject-Checkout the available optionsThe options for the bar code generator.
tagstring"canvas"canvas, img, svgThe tag of the bar code.