QrCode

Encodes a URL or short text into a scannable SVG QR code

Category: display · WCAG 2.2-AA · qr, qr-code, barcode, encode, display

States

Props

PropTypeDefaultDescription
valuestringText or URL to encode
sizenumber128Visual size of the component (e.g. 'sm', 'md', 'lg').
errorCorrection'L' | 'M' | 'Q' | 'H'MHigher levels tolerate more damage but hold less data
radiusstringCSS length rounding the corners
fillstringcurrentColorForeground color of the QR modules.
backgroundstringtransparentBackground color behind the QR code.
ariaLabelstringAlias of `label` — the same invisible accessible name under the catalog spelling. Neither is deprecated.
labelstringAccessible name for the QR image. Not rendered — screen readers only.

Design tokens

When to use

When not to use

How to build an accessible QrCode in React →

Examples

URL

<QrCode value="https://cascivo.dev" />

High error correction

<QrCode value="https://cascivo.dev" errorCorrection="H" size={200} />

Custom colors

<QrCode value="cascivo" fill="var(--cascivo-color-accent)" background="var(--cascivo-color-surface)" />

Related components

← Back to docs