Blazor.QrCodeGen 1.1.3

dotnet add package Blazor.QrCodeGen --version 1.1.3                
NuGet\Install-Package Blazor.QrCodeGen -Version 1.1.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Blazor.QrCodeGen" Version="1.1.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Blazor.QrCodeGen --version 1.1.3                
#r "nuget: Blazor.QrCodeGen, 1.1.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Blazor.QrCodeGen as a Cake Addin
#addin nuget:?package=Blazor.QrCodeGen&version=1.1.3

// Install Blazor.QrCodeGen as a Cake Tool
#tool nuget:?package=Blazor.QrCodeGen&version=1.1.3                

Blazor.QrCodeGen

Introduction

I have used QRCode.js as a base for the blazor QR code component. In your Blazor WASM application, you can use the Blazor component to generate QR codes without Java script. We support version .NET 8.0+
Try demo application

image

Prerequisites

To create Blazor Apps, install the latest version of Visual Studio with the ASP.NET and web development workload. For using .Net 8.0 you need at least Visual Studio 2022 17.8+. Another alternative would be to use Visual Studio code. Click here for more information.

Getting Started

Installation

  • Install the latest NuGet Package

Using Package Manager

Install-Package Blazor.QrCodeGen

Using .NET CLI

dotnet add package Blazor.QrCodeGen

Using MS VS Manage NuGet Packages search for Blazor.QrCodeGen

  • Add dependencies

You need to add 2 lines into index.html

    <script src="./_content/Blazor.QrCode/qrcode.min.js"></script>
    <script type="module" src="./_content/Blazor.QrCode/qrcodeInterop.js"></script>

Usage

Simple use with default settings:

<QrCode CanvasId="AnyId" Text="Any text"/>

Using with text and size in pixel:

<QrCode CanvasId="AnyId" Text="Any text" Size="64"/>

Using with customized settings:

<QrCode CanvasId="AnyId" Text="Any text" Options="_options" />
@code{
 private QrCodeOptions _options = new QRCodeOptons(){Color = Color.Blue};
}

Note: If you set both Size for Attribute and Options, then Attribute takes precedence.

Options

Name Default
Size 256
ColorDark Black
ColorLight White
ErrorCorrectionLevel High

Features

Blazor component for QR code generation. You can change:

  • Text
  • Size
  • Colors
  • Error correction level

Releases

1.1 Added property Size
1.0 Initial .Net8.0 release

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Blazor.QrCodeGen:

Package Downloads
JadeAuth.SDK.Blazor

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.3 3,530 12/2/2023
1.1.2 129 12/2/2023