Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Shadcn QR Code for React and Tailwind

Displays a QR code.

Installation

bunx --bun shadcn@latest add https://kit.dev/r/qr-code.json

Anatomy

QrCode
├── QrCodeFrame
│   └── QrCodePattern
├── QrCodeOverlay
└── QrCodeDownload

Usage

import { QrCode, QrCodeFrame } from "@/components/ui/qr-code";
<QrCode value="https://www.x.com/vinihvc">
  <QrCodeFrame />
</QrCode>

Accessibility

KeyDescription
Enter
Activate the focused control.
Space
Activate the focused control.

Demos

Download

Error Correction

Overlay

Size

API Reference

QrCode

div

PropType
AttributeType
CSS variableType

QrCodeFrame

svg

PropType
AttributeType
CSS variableType

QrCodePattern

path

PropType
AttributeType
CSS variableType

QrCodeOverlay

div

PropType
AttributeType
CSS variableType

QrCodeDownload

button

PropType
AttributeType

useQrCode