Skip to content

Comments

feat: add generatePath prop#389

Open
qkiroc wants to merge 1 commit intozpao:trunkfrom
qkiroc:trunk
Open

feat: add generatePath prop#389
qkiroc wants to merge 1 commit intozpao:trunkfrom
qkiroc:trunk

Conversation

@qkiroc
Copy link

@qkiroc qkiroc commented Feb 13, 2025

To support more styles, users can pass [generatePath] callback function to generate a custom QR code path using the QR code matrix and margin.

@qkiroc qkiroc changed the title feat: add generatePath feat: add generatePath prop Feb 13, 2025
@zpao
Copy link
Owner

zpao commented Feb 19, 2025

Do you have an example of a practical application? I think this could be an interesting solution to the feature request of different cell shapes (eg rendering circles).

@qkiroc
Copy link
Author

qkiroc commented Feb 19, 2025

be like image
image

@zpao
Copy link
Owner

zpao commented Mar 16, 2025

I understand what might be possible with this, but practically speaking, I think this would be challenging as is. The data is just an on/off matrix. You probably want more structured data out, at the very least separating out the finder patterns.

@didix16
Copy link

didix16 commented May 27, 2025

any news about this feature? It would be really nice that we can make any shape of QR, not just square.
Also it would be nice, to choose some predefined patters, like circles, romboids, etc, like this website does:

https://www.uniqode.com/qr-code-generator/create-circle-qr-codes

@qkiroc
Copy link
Author

qkiroc commented May 28, 2025

any news about this feature? It would be really nice that we can make any shape of QR, not just square. Also it would be nice, to choose some predefined patters, like circles, romboids, etc, like this website does:

https://www.uniqode.com/qr-code-generator/create-circle-qr-codes
I needed this feature urgently for my own project, so I created a separate repository for it. You’re welcome to take a look—hopefully it covers what you need.
https://github.com/qkiroc/qrcode-react

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants