qr-svelte Svelte Themes

Qr Svelte

Svelte components for generating and scanning QR codes

svelte-qr

QR code generator and scanner for Svelte, based on the libraries qrcode and qr-scanner. Example usage:

<script lang="ts">
  import { Generator, Scanner } from "svelte-qr";
  let lastDetectedCode: string;
</script>
<Generator content="Hello world!" fgColor="#ffff00ff" />
<Scanner on:detected={(e) => {lastDetectedCode = e.detail.data}} />
<p>
  Last detected code: {lastDetectedCode}
</p>

You will find a more detailed documentation in the JSDoc comments for each prop.

Top categories

Loading Svelte Themes