![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@trasherdk/svelte-qrcode
Advanced tools
This is a fork of https://github.com/bonosoft/sveltekit-qrcode
The original package is not maintained and does not support Svelte 5.
Use your package manager to install the module directly from GitHub:
npm install @trasherdk/svelte-qrcode
Now you can start adding QR Codes to your pages.
<script lang="ts">
import QRCode from "@trasherdk/svelte-qrcode"
</script>
<QRCode content="Test"></QRCode>
While conventional bar codes are capable of storing a maximum of approximately 20 digits, QR Code is capable of handling several dozen to several hundred times more information.
QR Code is capable of handling all types of data, such as numeric and alphabetic characters, Kanji, Kana, Hiragana, symbols, binary, and control codes. Up to 7,089 characters can be encoded in one symbol.
Content is the text that needs to be send to the code reader. The text is normally an URL to a web site, or a code that is used by an application, for example in handling secrets in time based one time password applications.
<QRCode content="https://trasher.dk/"/>
You can set the size used for generation, the larger the size, the more information you are able to store in the QR code. The size is also used for the container in pixels. You can also specify the padding in module units, and recommended minimum is 4.
With the repsponsive settings enabled, the size settings will only be used in the code calculation, and the container will addapt and use all available space in it's parent element.
<QRCode size="50" content="https://trasher.dk/"/>
<QRCode padding="10" content="https://trasher.dk/"/>
<QRCode responsive='true' content="https://trasher.dk/"/>
With the colour settings, you can control both the front and background colour.
<QRCode color="#009900" content="https://trasher.dk/"/>
<QRCode color="#ffffff" bgcolor="#009900" content="https://trasher.dk/"/>
QR Code has error correction capability to restore data if the code is dirty or damaged. Four error correction levels are available for users to choose according to the operating environment. Raising this level improves error correction capability but also increases the amount of data QR Code size. To select error correction level, various factors such as the operating environment and QR Code size need to be considered. Level Q or H may be selected for factory environment where QR Code get dirty, whereas Level L may be selected for clean environment with the large amount of data. Typically, Level M (15%) is most frequently selected.
<QRCode errorCorrection='L' content="https://trasher.dk/"/>
<QRCode errorCorrection='M' content="https://trasher.dk/"/>
<QRCode errorCorrection='Q' content="https://trasher.dk/"/>
<QRCode errorCorrection='H' content="https://trasher.dk/"/>
Sample URL for a John Doe user on the Acme app:
<QRCode content="otpauth://totp/ACME%20Co:john.doe@email.com?secret=HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ&issuer=ACME%20Co&algorithm=SHA1&digits=6&period=30"/>
FAQs
QR Code generator component for Svelte
We found that @trasherdk/svelte-qrcode demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.