Skip to content
caliper ui pro docs

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.

Pro

€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

terminal
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.

PropTypeDefaultDescription
value *string—The text or link to encode.
labelstring—What the code is for, read to assistive technology, e.g. "Scan to open the invoice". Defaults to the value.
levelQrLevel"M"Error correction: L 7%, M 15%, Q 25%, H 30% of the code can be damaged and still read.
sizenumber160Drawn width and height in pixels. The code is always drawn crisp, at whole modules.

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.md

The index of every part is at /llms.txt.

More in Table