Skip to content

Le-Space/qrcode-scanner-svelte

 
 

Repository files navigation

PWA QR Code Scanner with BC-UR support

QR Code scanner in a Svelte Component with BC-UR Encoding support. It is also known as "animated" QR-Codes.

BC-UR not to confuse with BBQR - Better Bitcoin QR, which isn't supported yet. Both standards are supported by major Bitcoin wallets such as Electrum, BlueWallet, Sparrow Wallet and numerous other hardware wallets.

Basic use:

Run npm i @doichain/bcur-code-scanner-svelte

<Scanner />

Custom

    let result

    <Scanner bind:result>
        <!-- Insert custom results component if you want to do something unique with the QR code data -->
		<!-- override default by placing handler in here  -->
		{#if result}
			<div>
				The result is: {result}
			</div>
			<div>
				<button on:click={() => (result = null)}>Scan again</button>
			</div>
		{/if}
	</Scanner>

Run a demo

  1. Checkout this repo and run npm i
  2. Run npm run dev

About

In browser QR Code Scanner, Svelte Component

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Svelte 82.6%
  • JavaScript 11.7%
  • CSS 3.8%
  • HTML 1.9%