<bitcoin-qr/>

A QR code web component for Bitcoin on-chain, Lightning, and unified BIP-21 payments.

<bitcoin-qr
	id="qr"
	unified="bitcoin:BC1QYLH3U67J673H6Y6ALV70M0PL2YZ53TZHVXGG7U?lightning=LNBC10U1P3PJ257PP5YZTKWJCZ5FTL5LAXKAV23ZMZEKAW37ZK6KMV80PK4XAEV5QHTZ7QDPDWD3XGER9WD5KWM36YPRX7U3QD36KUCMGYP282ETNV3SHJCQZPGXQYZ5VQSP5USYC4LK9CHSFP53KVCNVQ456GANH60D89REYKDNGSMTJ6YW3NHVQ9QYYSSQJCEWM5CJWZ4A6RFJX77C490YCED6PEMK0UPKXHY89CMM7SCT66K8GNEANWYKZGDRWRFJE69H9U5U0W57RRCSYSAS7GADWMZXC8C6T0SPJAZUP6&amount=0.00001&label=payjoin.org&message=Donation to payjoin.org"
	width="300"
	height="300"
	bitcoin="BC1QYLH3U67J673H6Y6ALV70M0PL2YZ53TZHVXGG7U"
	lightning="LNBC10U1P3PJ257PP5YZTKWJCZ5FTL5LAXKAV23ZMZEKAW37ZK6KMV80PK4XAEV5QHTZ7QDPDWD3XGER9WD5KWM36YPRX7U3QD36KUCMGYP282ETNV3SHJCQZPGXQYZ5VQSP5USYC4LK9CHSFP53KVCNVQ456GANH60D89REYKDNGSMTJ6YW3NHVQ9QYYSSQJCEWM5CJWZ4A6RFJX77C490YCED6PEMK0UPKXHY89CMM7SCT66K8GNEANWYKZGDRWRFJE69H9U5U0W57RRCSYSAS7GADWMZXC8C6T0SPJAZUP6"
	parameters="amount=0.00001&label=payjoin.org&message=Donation to payjoin.org"
	image="./assets/bitcoin.svg"
	is-polling="false"
	poll-interval="1000"
	type="svg"
	corners-square-color="#000"
	corners-dot-color="#000"
	corners-square-type="extra-rounded"
	dots-type="classy-rounded"
	dots-color="#000"
	debug="true"
	poll-callback={callbackExample}
/>
Sample Callback Function (Replace this with your function to check for payments)

// After the QR code is scanned, the callback function will be called every {interval} milliseconds
// This trivial example sets paid = true after 5 intervals.
async function callbackExample() {
	pollCount += 1;
	if (pollCount >= 5) {
		isPolling = false;
		paid = true;
	}
};
Corners Square Type Dots Type
For remaining options, see qr-code-styling