react-qr-code icon indicating copy to clipboard operation
react-qr-code copied to clipboard

[Feature Request] Canvas / img tag output

Open wyqydsyq opened this issue 5 years ago • 5 comments

It would be nice if the returned VDOM could be the SVG data embedded into either a canvas or img, allowing it to be more easily saved as a PNG using native browser interactions

wyqydsyq avatar Jun 25 '20 06:06 wyqydsyq

Indeed, this could be a way to use it in PDF generators as well.

MorenoMdz avatar Aug 22 '20 22:08 MorenoMdz

Just as a small datapoint, I chose to use this package over others because it did not use canvas or have a lot of extra capabilities. It's the smallest and simplest package I could find to generate an SVG QR code.

IanVS avatar Aug 17 '21 15:08 IanVS

Just as a small datapoint, I chose to use this package over others because it did not use canvas or have a lot of extra capabilities. It's the smallest and simplest package I could find to generate an SVG QR code.

Do you have a way to export your SVG?

jelizarovas avatar Nov 03 '21 00:11 jelizarovas

Do you have a way to export your SVG?

What do you mean by export it? I show it on a website for a 2fa code.

IanVS avatar Nov 03 '21 00:11 IanVS

Here is a demo with a button to save the SVG: https://rosskhanas.github.io/react-qr-code/

rosskhanas avatar May 23 '22 11:05 rosskhanas