shadcn.io is not affiliated with official shadcn/ui
Framework
UI library
Radix UI does not include this primitive, so this page uses the Ark UI component. The visuals match the Ark UI version.
Installation
bunx --bun shadcn@latest add https://kit.dev/r/radix/qr-code.jsonAnatomy
QrCode
├── QrCodeFrame
│ └── QrCodePattern
├── QrCodeOverlay
└── QrCodeDownloadUsage
import { QrCode, QrCodeFrame } from "@/components/ui/qr-code";<QrCode value="https://www.x.com/vinihvc">
<QrCodeFrame />
</QrCode>Accessibility
| Key | Description |
|---|---|
Enter | Activate the focused control. |
Space | Activate the focused control. |
Demos
Download
Error Correction
Overlay
Size
API Reference
QrCode
div
PropType
AttributeType
CSS variableType
--qr-code-sizestring--qrcode-heightstring--qrcode-pixel-sizestring--qrcode-widthstringQrCodeFrame
svg
PropType
AttributeType
CSS variableType
--qr-code-sizestringQrCodePattern
path
PropType
AttributeType
CSS variableType
--qr-code-sizestringQrCodeOverlay
div
PropType
AttributeType
CSS variableType
--qr-code-overlay-sizestringQrCodeDownload
button
PropType
AttributeType