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-style

v1.0.0

Published

A Vue 3 component for generating customizable QR codes with download functionality

Readme

Vue QR Style 🎨

A premium Vue 3 component for generating highly customizable QR codes, powered by qr-code-styling.

Vue QR Style Demo

Features

  • 🚀 Vue 3 + TypeScript - Built with Composition API and full type safety.
  • 🎨 Extremely Customizable - Change dots, corners, backgrounds, and more.
  • Shape Support - Support for both standard Square and modern Circle QR shapes.
  • 🌈 Gradient Support - Beautiful linear and radial gradients for dots and backgrounds.
  • 🖼️ Logo Embedding - Add your brand logo with smart dot-hiding logic.
  • 💾 Multi-format Download - Export as SVG, PNG, JPEG, or WebP.
  • Reactive - Updates in real-time as props change.

Installation

npm install vue-qr-style qr-code-styling

Setup

Global Registration

import { createApp } from "vue";
import VueQrStyle from "vue-qr-style";
import App from "./App.vue";

const app = createApp(App);
app.use(VueQrStyle);
app.mount("#app");

Local Registration

<script setup>
import { QrCodeGenerator } from "vue-qr-style";
</script>

Basic Usage

<template>
  <QrCodeGenerator
    data="https://github.com/jdavidoa91/vue-qr-style"
    :width="300"
    :height="300"
    :dotsOptions="{ type: 'rounded', color: '#41b883' }"
  />
</template>

API Reference

Main Props

| Prop | Type | Default | Description | | -------- | ---------------------- | ------------ | ----------------------------------------------------- | | data | string | Required | The content of the QR code. | | width | number | 300 | Width of the QR code. | | height | number | 300 | Height of the QR code. | | margin | number | 0 | Margin around the QR code cells. | | type | 'canvas' \| 'svg' | 'canvas' | Drawing type. SVG is recommended for high resolution. | | shape | 'square' \| 'circle' | 'square' | The overall shape of the QR code. | | image | string | undefined | URL/Path of the center image/logo. |

Nested Options

dotsOptions

| Property | Type | Default | Description | | ---------- | --------- | ----------- | ------------------------------------------------------------------------------------ | | type | DotType | 'square' | 'square' \| 'dots' \| 'rounded' \| 'extra-rounded' \| 'classy' \| 'classy-rounded' | | color | string | '#000' | Solid color of the dots. | | gradient | object | undefined | Gradient configuration (Type, rotation, colorStops). |

imageOptions

| Property | Type | Default | Description | | -------------------- | --------- | ------------- | -------------------------- | | hideBackgroundDots | boolean | true | Hide dots behind the logo. | | imageSize | number | 0.4 | Size coefficient (0 to 1). | | margin | number | 0 | Margin around the logo. | | crossOrigin | string | 'anonymous' | CORS policy for the image. |

Exposed Methods

Access these via a component ref:

const qrRef = ref<InstanceType<typeof QrCodeGenerator> | null>(null);

// Download the QR
qrRef.value?.download({
  name: "my-qr",
  extension: "png",
});

// Get raw blob/data
const data = await qrRef.value?.getRawData("svg");

TypeScript Support

The package exports all relevant types:

import type {
  QRCodeStylingOptions,
  DotType,
  FileExtension,
} from "vue-qr-style";

Troubleshooting

Content is not showing / Logo issues

  • Ensure the data prop is not an empty string.
  • If using an external logo URL, ensure it allows CORS. You can adjust the imageOptions.crossOrigin prop if needed.

License

MIT