0.0.3 • Published 3 years ago

@drblaster/svelte-qrcode v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Svelte QrCode

npm version License: MIT Total alerts Language grade: JavaScript

Generate from QR Code with style, logo, and Error Level Rate that serve to avoid errors if the QR Code is damaged.

Installation

npm i svelte-qrcode
// OR
yarn add svelte-qrcode

Demo Link

image

Local demo:

git clone https://github.com/JonasJs/svelte-qrcode.git
cd svelte-qrcode
yarn install && yarn start

Examples

An example of how to use the library:

Example Repl

<script>import QrCode from "svelte-qrcode"</script>
<div class="container">
  <QrCode value="https://github.com/" />
</div>

Properties

You can control many aspects of the QR code using the following props:

PropTypeDescriptionDefault
backgroundStringBackground color of the QR code"#FFFFFF"
foregroundStringForeground color of the QR code"#000000"
levelStringError correction level of the QR code (L, M, Q, H)"L"
paddingNumberPadding for the QR code (pixels)0
sizeNumberSize of the QR code (pixels)200
valueStringValue encoded within the QR code""

NPM Statistics

Download stats for this NPM package

NPM

License

Svelte Adress Autocomplete is open source software licensed as MIT.