vue-barcode
Bar code component for Vue 3, bases on JsBarcode. For Vue 2, check out the
v1
branch.
Main npm package files
dist/
βββ vue-barcode.js (UMD, default)
βββ vue-barcode.min.js (UMD, compressed)
βββ vue-barcode.esm.js (ECMAScript Module)
βββ vue-barcode.esm.min.js (ECMAScript Module, compressed)
βββ vue-barcode.d.ts (TypeScript Declaration File)
Getting started
Installation
Using npm:
npm install vue@3 jsbarcode@3 @chenfengyuan/vue-barcode@2
Using pnpm:
pnpm add vue@3 jsbarcode@3 @chenfengyuan/vue-barcode@2
Using Yarn:
yarn add vue@3 jsbarcode@3 @chenfengyuan/vue-barcode@2
Using CDN:
<script src="https://unpkg.com/vue@3"></script><!-- Vue.js is required -->
<script src="https://unpkg.com/jsbarcode@3/dist/JsBarcode.all.min.js"></script><!-- JsBarcode is required -->
<script src="https://unpkg.com/@chenfengyuan/vue-barcode@2"></script>
Usage
import { createApp } from 'vue';
import VueBarcode from '@chenfengyuan/vue-barcode';
const app = createApp({});
app.component(VueBarcode.name, VueBarcode);
<vue-barcode value="Hello, World!" :options="{ displayValue: false }"></vue-barcode>
Browser support
Same as Vue 3.
Versioning
Maintained under the Semantic Versioning guidelines.
License
MIT Β© Chen Fengyuan