Brandon Lucas

Projectsmaintained

bitcoin-qr

A zero-dependency QR code web component for BIP-21 Bitcoin and Lightning payments.

Image of bitcoin-qr samples

Add your company’s image and style the QR to match!

I created a web component to make it easy to create BIP 21 compatible QR codes with a lot of developer-and-user-friendly defaults. One problem I consistently ran into when developing lightning applications was having to repeatedly build a QR code component with HTTP polling to check for payment, in addition to making many UX decisions about when to use BIP 21 for bitcoin: and lightning: URI prefixes and how to handle query params. Additionally, I found myself reimplementing a component that did all this in each framework (i.e. React, Svelte) I was using. As far as I know, everyone who’s building UIs in bitcoin has to keep redoing this work.

I decided it would be valuable (to myself, if nobody else) to build a universal web component that came with all this functionality out of the box with maximum configuration but opinionated defaults, that could be used in any framework or in pure HTML. And for extra fun, it’s built on a framework that allows a lot of styling customization!

Feedback on this would be very much appreciated, please feel free to open an issue if you find a problem or have any suggestions for improvement!