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
| Prop | Type | Description |
|---|---|---|
| svg | SVGSVGElement | The SVG element of the QR code. |
| download | (options: DownloadOptions) => void | Method to download the QR code in different formats. |
DownloadOptions
| Prop | Type | Description | Default | Required | Possible Values |
|---|---|---|---|---|---|
| name | string | The name of the file to download. | qr-code | No | |
| format | DownloadFileFormat | The format of the file to download. | svg | No | svg png jpeg |
| size | number | The size of the QR Code to download. | 500 | No |