npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vue-qr

v5.0.3

Published

The Vue 3.x component for generating QR codes with awesome styles

Readme

vue-qr

The Vue 3 Component for SumiMakito's Awesome-qr.js.

The only one qr code component for Vue.js you need!

Notice

  • v5.x 仅支持 Vue 3
  • Vue 2 用户请使用 v4.x: npm install vue-qr@4
  • 不支持 IE 浏览器

Examples

Try to scan these QR codes below with your smart phone.

Example 1|Example 2|Example 3|Example 4 ------------ | ------------- | -------------| ------------- | | |

Demo

npm run dev

Installation

npm install vue-qr --save

Usage

Global Registration

import { createApp } from 'vue'
import { VueQr, install } from 'vue-qr'

const app = createApp(App)
app.use({ install }) // or app.component('VueQr', VueQr)
app.mount('#app')

Local Registration

<script setup>
import VueQr from 'vue-qr'
</script>

<template>
  <vue-qr text="Hello world!" />
  <vue-qr :bgSrc="src" :logoSrc="src2" text="Hello world!" :size="200" />
  <vue-qr text="Hello world!" @generated="onGenerated" qid="testid" />
</template>

Event Handling

<script setup>
function onGenerated(dataUrl, id) {
  console.log(dataUrl, id)
}
</script>

<template>
  <vue-qr text="Hello world!" @generated="onGenerated" qid="testid" />
</template>

Props

Parameter | Type | Default | Explanation ----|----|----|---- text | String | (required) | Contents to encode correctLevel | Number | 1 | Correct Level 0-3 size | Number | 200 | Width and height of the output QR code, includes margin margin | Number | 20 | Margin around the QR code colorDark | String | '#000000' | Color of data blocks colorLight | String | '#FFFFFF' | Color of empty space components | Object | - | Controls appearances of parts. See ComponentOptions bgSrc | String | - | Background image URL gifBgSrc | String | - | GIF background URL (overrides bgSrc) backgroundColor | String | '#FFFFFF' | Background color backgroundDimming | String | 'rgba(0,0,0,0)' | Color mask above background image logoSrc | String | - | Logo URL at center logoScale | Number | 0.2 | Logo size = logoScale * (size - 2 * margin) logoMargin | Number | 0 | White margin around logo logoBackgroundColor | String | 'rgba(255,255,255,1)' | Logo background color logoCornerRadius | Number | 8 | Logo corner radius whiteMargin | Boolean | true | White border around background image dotScale | Number | 1 | Data dots scale (0 < scale ≤ 1) autoColor | Boolean | true | Use dominant color of background as colorDark binarize | Boolean | false | Binarize the image binarizeThreshold | Number | 128 | Binarize threshold (0-255) bindElement | Boolean | true | Auto-binds generated QR to HTML element qid | String | - | ID for async identification

Events

Event | Parameters | Description ----|----|----| generated | (dataUrl, qid) | Emitted when QR code is generated

ComponentOptions

type ComponentOptions = {
  data?: { scale?: number }
  timing?: { scale?: number; protectors?: boolean }
  alignment?: { scale?: number; protectors?: boolean }
  cornerAlignment?: { scale?: number; protectors?: boolean }
}

Default:

{
  data: { scale: 1 },
  timing: { scale: 1, protectors: false },
  alignment: { scale: 1, protectors: false },
  cornerAlignment: { scale: 1, protectors: true }
}

For more details check out Awesome-qr.js