qr-svelte

0.0.3 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i qr-svelte

Weekly Downloads

13

Version

0.0.3

License

none

Unpacked Size

32.5 kB

Total Files

27

Last publish

Collaborators

  • c.sha