QRdx

QR Code Download

A download menu that exports a QR code as PNG, SVG, JPG or PDF at the size you pick, or copies it as an image.

Installation

pnpm dlx shadcn@latest add https://qrdx.dev/r/qr-code-download.json

Usage

import { QrCodeDownload } from "@/components/qr-code-download";
<QrCodeDownload value="https://qrdx.dev" />

The menu lists each format with a short hint, a size picker, and "Copy image", which puts a PNG on the clipboard. Files are rendered in the browser; nothing is uploaded.

Examples

Styled export

Give qr the same style object you render on screen, so every exported file matches the preview. formats, sizes, label and variant shape the menu and its button.

Formats

FormatOutput
pngImage with the code's background
jpgImage with a solid background
svgVector that scales to any size
pdfSingle-page document. Needs the optional jspdf package (npm install jspdf)

Raster sizes go from 50 to 5000 pixels. Pass a single entry in sizes to hide the size picker.

API Reference

Prop

Type

Any other prop, such as className, is passed to the wrapping <div>.

Last updated on

On this page