# vue-qrcode-component-v3

> Create QR codes with a simple Vue component

Latest version **3.1.0** (published 2023-04-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-qrcode-component-v3
pnpm add vue-qrcode-component-v3
yarn add vue-qrcode-component-v3
bun add vue-qrcode-component-v3
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.1.0 |
| Published | 2023-04-17 |
| First published | 2023-04-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 37.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Marko Wallin |
| Maintainers | walokra |
| Keywords | qr, code, qrcode, vue, component |

## Links

- npm: https://www.npmjs.com/package/vue-qrcode-component-v3
- Repository: https://github.com/walokra/vue-qrcode-component-v3
- Homepage: https://github.com/walokra/vue-qrcode-component-v3#readme
- Issues: https://github.com/walokra/vue-qrcode-component-v3/issues
- npm.io page: https://npm.io/package/vue-qrcode-component-v3

## Dependencies (1)

- [vue](https://npm.io/package/vue.md) ^3.1.0

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads
- [datasets-fi-postalcodes](https://npm.io/package/datasets-fi-postalcodes.md) — 1.1K weekly downloads

## Recent versions

- 3.1.0 (latest) — 2023-04-17
- 3.0.0 — 2023-04-02

## README

# vue-qrcode-component-v3

Create QR codes with a simple Vue component, forked from <a chref="https://github.com/gerardreches/vue-qrcode-component">gerardreches/vue-qrcode-component</a> and updated for Vue 3 and Vite.

[Demo and Documentation on GitHub Pages](https://walokra.github.io/vue-qrcode-component-v3/)

## Installation

Install the package:

```shell
npm install vue-qrcode-component-v3
```

Then register the component:

```js
import { createApp } from 'vue'
import VueQRCodeComponent from 'vue-qrcode-component-v3'

const app = createApp(App)
app.component('qr-code', VueQRCodeComponent)
```

Now you can use it as:

```html
<qr-code text="Text to encode"></qr-code>
```

## Usage

### Props

| prop        | type   | required | default | validation                         |
|-------------|--------|----------|---------|------------------------------------|
| text        | String | true     |         |                                    |
| size        | Number | false    | 256     |                                    |
| color       | String | false    | '#000'  |                                    |
| bg-color    | String | false    | '#FFF'  |                                    |
| error-level | String | false    | 'H'     | Only accepts 'L', 'M', 'Q' or 'H'. |

_**Note:** size prop uses pixels units._

### Example

We will generate a QR code that gives an URL on decode. It measures 500x500 px, uses a yellow color for the code and a blue color for the background. This QR will use a **Low** error correction level.

```html
<qr-code
    text="https://goo.gl/9eIWP9"
    size="500"
    color="#f1c40f"
    bg-color="#3498db"
    error-level="L">
</qr-code>
```

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