vbarcode
v0.0.16
Published
Vue3 Wrapper for JsBarcode
Downloads
516
Maintainers
Readme
VBarcode
This is a JsBarcode vue 3 wrapper.
View JsBarcode to learn more.
Install
pnpm i vbarcode
Example
<script setup lang="ts">
import { VBarcode } from "vbarcode";
</script>
<template>
<v-barcode value="Apple" />
</template>
Props:
For props, try to match the wiki page from JsBarcode, if there is anything not matching please let me know.
| Option | Default value | Type |
|--------|---------------|------|
| format
| "auto" (CODE128)
| String
|
| width
| 2
| Number
|
| height
| 100
| Number
|
| displayValue
| true
| Boolean
|
| text
| undefined
| String
|
| fontOptions
| ""
| String
|
| font
| "monospace"
| String
|
| textAlign
| "center"
| String
|
| textPosition
| "bottom"
| String
|
| textMargin
| 2
| Number
|
| fontSize
| 20
| Number
|
| background
| "#ffffff"
| String (CSS color)
|
| lineColor
| "#000000"
| String (CSS color)
|
| margin
| 10
| Number
|
| marginTop
| undefined
| Number
|
| marginBottom
| undefined
| Number
|
| marginLeft
| undefined
| Number
|
| marginRight
| undefined
| Number
|
| valid
| function(valid){}
| Function
|