This nuget wraps jsQR in form of a simple component.
No additional configuration, scripts or injects needed.
Just place the component and provide a OnCodeScanned
handler method.
No additional requirements are needed
Install nuget package : DumBlazor.QrCodeScanner
dotnet cli: dotnet add package DumBlazor.QrCodeScanner
Package Manager: Install-Package DumBlazor.QrCodeScanner
Place <QrCodeScanner />
Blazor component wherever needed.
@using DumBlazor.QrCodeScanner
<QrCodeScanner OnCodeScanned="HANDLER" />
OnCodeScanned
is an [EditorRequired]
parameter and the component expects it to be provided.
Parameter | Type | Required | Description |
---|---|---|---|
OnCodeScanned | Action | Yes | Method to invoke on code scan |
OnError | Action | No | Method to invoke on initialization or code scan error |
OnReady | Action | No | Method to invoke on successful initialization |
Width | string | No | Set the fixed width of canvas in pixels |
Interval | TimeSpan | No | Minimal interval between successful scans. Default: TimeSpan.Zero |
HighlightColor | string | no | Highlight color of a found QR Code on canvas. Default: #FF3B58 |
This wrapper uses jsQR to handle code scans. The wrapper was inspired by YannVasseur35's implementation