svelte-qrcode-action
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

svelte-qrcode-action

I have just converted https://github.com/kozakdenys/qr-code-styling to a Svelte action and added support for reactivity.

You can find the options API documentation for kozakdenys/qr-code-stylinghere

Example

Simple

<script>
	import { qrcode } from 'svelte-qrcode-action';
</script>

<div use:qrcode={{ data: 'this content of qrcode' }} />

With reactive

<script>
	import { qrcode } from 'svelte-qrcode-action';
	import { onMount } from 'svelte';

	let options = {
		data: 'qr content'
	};
	onMount(() => {
		setTimeout(() => {
			options.dotsOptions = {
				color: '#4267b2',
				type: 'rounded'
			};
		}, 2_000);
	});
</script>

<div use:qrcode={options} />

Package Sidebar

Install

npm i svelte-qrcode-action

Weekly Downloads

69

Version

1.0.2

License

none

Unpacked Size

3.21 kB

Total Files

6

Last publish

Collaborators

  • binsarjr