QR Code
Encodes links and structured payloads as responsive, accessible SVG with scan-safe defaults.
@rivetui/qr-codePreview
Explore each composition interactively, then open its code in the same context.
Default
Encode links, Wi-Fi credentials, passkey handoffs, or any other string payload.
Note
size, foreground, and background are presentation controls. Keep strong contrast and always provide an accessible label.
Destination / Documentation
Open Rivet UI
Scan to open the component registry on another device.
Embedded logo
Place a small brand mark in the center when the destination needs stronger visual identity.
Note
Adding a logo automatically uses high error correction and clears the modules behind the image.
High correction
Adding a logo automatically uses level H and clears the modules behind the mark.
Registry
Installation
Add the component source and its declared dependencies with the shadcn CLI.
Install component
bunx --bun shadcn@latest add @rivetui/qr-codePublic interface
API reference
Component-specific props are listed here. Native element and Base UI props continue to pass through.
| Prop | Type | Default |
|---|---|---|
value | string | string[] | required |
size | number | 192 |
level | "L" | "M" | "Q" | "H" | "M" / "H" with logo |
quietZone | number | 4 |
foreground | string | "#000000" |
background | string | "#FFFFFF" |
logo | QRCodeLogo | — |
aria-label | string | "QR code" |
className | string | — |