QR code
A QR code drawn as one crisp SVG path, encoded in the file with no dependency and no request. It stays dark on a white plate in both themes, keeps the quiet zone scanners need, and says what it is for to assistive technology.
€12,480.00 · due 4 Nov
When to use
- Handing a link from screen to phone: sign-in on another device, an invoice, a ticket, a download.
- Printed or exported pages where a link cannot be clicked.
When not to use
- As the only way to reach something; always show the link or a copy button beside it.
- Payloads longer than a short link; version 10 holds about 213 bytes at level M.
Installation
pnpm dlx shadcn@latest add @caliper/qr-code
Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.
API reference
QrCode
4 props
Also accepts the native props of its root element and a ref.
encodeQr
0 props
No props of its own; it accepts the native props of its root element.
Keyboard
- No custom key handling; Tab and the native activation keys do the work.
Accessibility
It exposes note and img semantics, with aria-label kept in step with state.
Notes for AI
Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.
/docs/components/qr-code.mdThe index of every part is at /llms.txt.