zpao / qrcode.react

A <QRCode/> component for use with React.

Home Page:https://zpao.github.io/qrcode.react/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is level and image src?

mdodge-ecgrow opened this issue · comments

I am brand new to using this library. And I was looking through the documentation on the home page. Most of the properties are pretty self explanatory. But two that I can not figure out are level and the src in the image object. It'd be nice if you at least included a sentence about these properties in the docs.

Oh and also excavate. What does that one mean as well?

That's a good idea, not sure why I haven't done a better job documenting. Playing with https://zpao.github.io/qrcode.react/ hopefully helps to see the effect of the settings.

Level is error correction level: https://www.qrcode.com/en/about/error_correction.html
Src would be equivalent to src for an <img> tag - URL where the image can be loaded from.
And excavate determines if we clear space around that loaded image, so it's not visible overlapping with the foreground squares.

Hope that helps. I'll leave this open though to remind me to write some better docs.