Required Props
The data to encode in the QR code. Can contain up to 2,953 characters according to the official QR spec.Supports UTF-8 text including non-ASCII characters (Korean, Japanese, emoji, etc.).Platform availability: web, iOS, AndroidExample:
Optional Props
The width and height of the QR code in pixels. This sets the intrinsic size of the SVG element.Platform availability: web, iOS, AndroidExample:
The background color of the QR code. Accepts any valid CSS color value including hex, rgb, rgba, named colors, or CSS color objects.Platform availability: web, iOS, AndroidExample:
The foreground color of the QR code (the color of the QR code squares). Accepts any valid CSS color value including hex, rgb, rgba, named colors, or CSS color objects.Platform availability: web, iOS, AndroidExample:
The error correction level of the QR code. Higher levels provide better error recovery but result in larger QR codes.According to the official QR spec:
- L: Low - ~7% of codewords can be restored
- M: Medium - ~15% of codewords can be restored
- Q: Quartile - ~25% of codewords can be restored
- H: High - ~30% of codewords can be restored
An optional title for the SVG element. This appears as a
<title> element within the SVG, which can be used for accessibility purposes or as a tooltip in web browsers.Platform availability: web onlyExample:Inherited SVG Props
TheQRCode component extends React.SVGProps<SVGSVGElement>, which means it accepts all standard SVG element props. Commonly used inherited props include: