# vue-barcodes-generator

> [![npm](https://img.shields.io/npm/v/vue-barcodes-generator.svg?style=flat-square)](https://www.npmjs.com/package/vue-barcodes-generator) [![npm](https://img.shields.io/npm/dt/vue-barcodes-generator.svg?style=flat-square)](https://www.npmjs.com/package/vu

Latest version **0.1.8** (published 2023-02-21) · 0 weekly downloads

## Install

```sh
npm install vue-barcodes-generator
pnpm add vue-barcodes-generator
yarn add vue-barcodes-generator
bun add vue-barcodes-generator
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.8 |
| Published | 2023-02-21 |
| First published | 2023-02-12 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 1.3 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Maintainers | alertis |

## Links

- npm: https://www.npmjs.com/package/vue-barcodes-generator
- Repository: https://github.com/Alertis/vue-barcodes-generator
- Homepage: https://github.com/Alertis/vue-barcodes-generator#readme
- Issues: https://github.com/Alertis/vue-barcodes-generator/issues
- npm.io page: https://npm.io/package/vue-barcodes-generator

## Dependencies (3)

- [vue](https://npm.io/package/vue.md) ^2.6.11
- [core-js](https://npm.io/package/core-js.md) ^3.6.5
- [jsbarcode](https://npm.io/package/jsbarcode.md) ^3.11.5

## Recent versions

- 0.1.8 (latest) — 2023-02-21
- 0.1.7 — 2023-02-20
- 0.1.6 — 2023-02-20
- 0.1.5 — 2023-02-19
- 0.1.4 — 2023-02-12
- 0.1.3 — 2023-02-12
- 0.1.1 — 2023-02-12

## README

# vue-barcodes-generator

[![npm](https://img.shields.io/npm/v/vue-barcodes-generator.svg?style=flat-square)](https://www.npmjs.com/package/vue-barcodes-generator)
[![npm](https://img.shields.io/npm/dt/vue-barcodes-generator.svg?style=flat-square)](https://www.npmjs.com/package/vue-barcodes-generator)
[![npm](https://img.shields.io/npm/dm/vue-barcodes-generator.svg?style=flat-square)](https://www.npmjs.com/package/vue-barcodes-generator)

This component creates a form to generate barcodes. The form includes three required inputs (start number, barcode count, and barcode number length). Also, you can add some additional inputs to take into account while generating the barcode. After you have specified the related options, you can submit the form to generate barcodes.

![](https://raw.githubusercontent.com/Alertis/vue-barcodes-generator/main/screenshots/app.png)

## Install

```bash
npm install vue-barcodes-generator
```

## Usage

You can use the `vue-barcode-generator` package easily by following the three steps below:

#### 1. Add the `VueBarcodes` as a component

```javascript
import VueBarcodes from 'vue-barcodes-generator'
new Vue({
  components: {
    'VueBarcodes': VueBarcodes
  }
})
```

#### 2. Specify the barcode options

```javascript
data: function(){
    return{
      inputs: [
        {
            name: 'start',
            title: 'First Barcode No',
            val: 1
        },
        {
            name: 'count',
            title: 'Barcode Count',
            val: 10
        },
        {
            name: 'length',
            title: 'Number Length',
            val: 2
        },
      ],
      buttonText: 'Create',
    }
  }
```

#### 3. Use the `VueBarcodes` component

```html
  <VueBarcodes 
    :inputs="inputs"
    :buttonText="buttonText"
  />

```

## Props

|Props|Description|Required|Type|Default|
|-----|-----------|--------|----|-------|
|inputs|Components use this props for generate form|true|Array|`[{name: 'start', title: 'Start Number', val:1},{name: 'count', title: 'Barcode Count', val: 10}, {name: 'length', title: 'Number Length', val: 4}]`|
|buttonText|Title for button|true|String|`'Generate'`|
|buttonClass|Class name for button|false|String|-|
|barcodeConfig|Settings for barcode|false|Object|-|

### Inputs

This props type is `Array` and includes an element per form input. It has three required property and if you dont pass these elements, the component generates the default value. You can generate unlimited inputs.

```javascript 
[
    {
        name: 'start',
        title: 'Start Number',
        val:1
    },
    {
        name: 'count',
        title: 'Barcode Count',
        val: 10
    },
    {
        name: 'length', 
        title: 'Number Length',
        val: 4
    }
]
```

If you want to edit three required elements, you should add the element with the same name (start, count, length) as below:

<strong> name: </strong> unique name for input <br>
<strong> title: </strong> caption for input <br>
<strong> val: </strong> value for input


### barcodeConfig

This props type is `Object` and includes settings for generating barcodes. This package uses the [JsBarcode](https://github.com/lindell/JsBarcode) library to generate barcodes and you can inspect to [JsBarcode Documentation](https://github.com/lindell/JsBarcode/wiki/Options) for barcodeConfig props.

---
_Source: https://npm.io/package/vue-barcodes-generator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
