React QR Code

ReactQRCodeRef

The ReactQRCode component supports React refs. Developers can use ref to access the underlying svg and trigger actions such as downloading the QR code in different formats.

Props

PropTypeDescription
svg
SVGSVGElement
The SVG element of the QR code.
download
(options: DownloadOptions) => void
Method to download the QR code in different formats.

DownloadOptions

PropTypeDescriptionDefaultRequiredPossible Values
name
string
The name of the file to download.qr-codeNo
format
DownloadFileFormat
The format of the file to download.svgNo
svg
png
jpeg
size
number
The size of the QR Code to download.500No