![]() |
VOOZH | about |
dotnet add package Blazor.QrCodeGen --version 1.2.0
NuGet\Install-Package Blazor.QrCodeGen -Version 1.2.0
<PackageReference Include="Blazor.QrCodeGen" Version="1.2.0" />
<PackageVersion Include="Blazor.QrCodeGen" Version="1.2.0" />Directory.Packages.props
<PackageReference Include="Blazor.QrCodeGen" />Project file
paket add Blazor.QrCodeGen --version 1.2.0
#r "nuget: Blazor.QrCodeGen, 1.2.0"
#:package Blazor.QrCodeGen@1.2.0
#addin nuget:?package=Blazor.QrCodeGen&version=1.2.0Install as a Cake Addin
#tool nuget:?package=Blazor.QrCodeGen&version=1.2.0Install as a Cake Tool
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
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.
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
You need to add 2 lines into index.html
<script src="./_content/Blazor.QrCodeGen/qrcode.min.js"></script>
<script type="module" src="./_content/Blazor.QrCodeGen/qrcodeInterop.js"></script>
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.
| Name | Default |
|---|---|
| Size | 256 |
| ColorDark | Black |
| ColorLight | White |
| ErrorCorrectionLevel | High |
Blazor component for QR code generation. You can change:
1.2.0 - Update to .NET 10.0
1.1.2 - Update to .NET 9.0
1.1.1 - Added property Size
1.0.0 - Initial .Net8.0 release
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on Blazor.QrCodeGen:
| Package | Downloads |
|---|---|
|
JadeAuth.SDK.Blazor
Package Description |
This package is not used by any popular GitHub repositories.