Skip to main content

QRCode

QRCode is a component that generates and displays QR codes.

Usage​

<QRCode 
value="https://example.com"
size={200}
bgColor="white"
fgColor="black"
/>

Props​

value​

Type: string Required: true

The data to encode in the QR code.

size​

Type: number Default: 128

Size of the QR code in pixels.

bgColor​

Type: string Default: 'white'

Background color of the QR code.

fgColor​

Type: string Default: 'black'

Foreground color of the QR code.

level​

Type: 'L' | 'M' | 'Q' | 'H' Default: 'L'

Error correction level of the QR code:

  • 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)