Bit.BbScanner
11.0.0-pre-11
See the version list below for details.
dotnet add package Bit.BbScanner --version 11.0.0-pre-11
NuGet\Install-Package Bit.BbScanner -Version 11.0.0-pre-11
<PackageReference Include="Bit.BbScanner" Version="11.0.0-pre-11" />
<PackageVersion Include="Bit.BbScanner" Version="11.0.0-pre-11" />
<PackageReference Include="Bit.BbScanner" />
paket add Bit.BbScanner --version 11.0.0-pre-11
#r "nuget: Bit.BbScanner, 11.0.0-pre-11"
#:package Bit.BbScanner@11.0.0-pre-11
#addin nuget:?package=Bit.BbScanner&version=11.0.0-pre-11&prerelease
#tool nuget:?package=Bit.BbScanner&version=11.0.0-pre-11&prerelease
Bit.BbScanner
A dependency-free, high performance barcode scanner for Blazor: QR Code, Micro QR, Data Matrix, PDF417, Aztec, MaxiCode, Code 128, Code 39, Code 93, Codabar, EAN-13, EAN-8, UPC-A, UPC-E (with their add-ons), ITF, GS1 DataBar (with its stacked forms), DataBar Limited and DataBar Expanded, from the camera or from still images. The decoding - luminance conversion, binarization, detection, Reed-Solomon correction and bit stream parsing - is written in C#. JavaScript only opens the camera and copies pixels - there is no barcode SDK or JavaScript scanner library underneath.
Quick start
dotnet add package Bit.BbScanner
@* _Imports.razor *@
@using Bit.BbScanner
No services to register and no stylesheet to reference: the package's Blazor initializer injects
_content/Bit.BbScanner/bit-bbscanner.css automatically.
@rendermode InteractiveWebAssembly
<BbScanner Formats="BbBarcodeFormat.QrCode | BbBarcodeFormat.Ean13"
Region="BbScanRegion.CenteredSquare(0.7)"
OnScan="HandleScan"
OnError="e => _error = e" />
@code {
private BbScannerException? _error;
private void HandleScan(BbBarcodeResult result)
=> Console.WriteLine($"{result.Format}: {result.Text}");
}
Camera scanning runs on Blazor WebAssembly - a standalone app, or the WebAssembly pages of a Blazor Web App - and
needs a secure context (HTTPS or localhost). Publish that client compiled ahead of time
(<RunAOTCompilation>true</RunAOTCompilation>): on Blazor's default interpreter a 640x480 frame took about 100 ms in
Chromium on a desktop, compiled about 1 ms. The decoder itself runs anywhere .NET runs:
using var decoder = new BbBarcodeDecoder(BbScannerOptions.ForStillImages());
var result = decoder.Decode(rgbaPixels, width, height, BbPixelFormat.Rgba32);
Features
- Eighteen symbologies read to specification, checked against symbols written by an independent encoder; PDF417, Aztec, MaxiCode and Micro QR at any orientation.
- One copy per frame: frames reach managed memory through a
[JSImport]memory view, with no JSON or base64. - No garbage per frame: buffers, bit planes and detectors are reused, so an empty frame allocates nothing on the linear path.
- Misreads guarded against: check digits, guard patterns and repeated reads are verified before a value is reported.
- Camera selection, torch and zoom; still image scanning through a built-in file picker or
DecodeImage. - Scan regions, render fragment overlays and message templates, and theming through CSS custom properties.
- A labelled, keyboard-operable scanner that announces results and alerts failures, every text translatable through
BbScannerTexts, with right-to-left, reduced motion and forced colours support, and an optional vibration or beep. - A camera the phone ends when the page goes into the background is reopened when it returns;
ReleaseCameraWhenHiddencloses it whenever the page is hidden. - .NET 8, 9 and 10.
For AI agents
The demo site hosts an MCP server at https://bbscanner.bitplatform.dev/mcp
that answers from the shipped library: its API, its guide, its symbologies, a decode
lab and the demo's working pages.
Documentation
The full guide - symbologies, the component's parameters, events and methods, still images, styling, the decoder outside Blazor, hosting models, errors and permissions, what it reads, performance and architecture - is in the BbScanner README. See it running at bbscanner.bitplatform.dev.
| Product | Versions 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
-
net10.0
- Microsoft.AspNetCore.Components.Web (>= 10.0.0 && < 11.0.0)
-
net11.0
- Microsoft.AspNetCore.Components.Web (>= 11.0.0-rc.1.26425.128 && < 12.0.0)
-
net8.0
- Microsoft.AspNetCore.Components.Web (>= 8.0.0 && < 9.0.0)
-
net9.0
- Microsoft.AspNetCore.Components.Web (>= 9.0.0 && < 10.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0-pre-15 | 44 | 10/27/2026 |
| 11.0.0-pre-14 | 53 | 10/26/2026 |
| 11.0.0-pre-13 | 51 | 10/26/2026 |
| 11.0.0-pre-12 | 47 | 10/26/2026 |
| 11.0.0-pre-11 | 60 | 10/25/2026 |
| 11.0.0-pre-10 | 66 | 10/18/2026 |
| 10.7.0 | 77 | 10/25/2026 |
| 10.7.0-pre-04 | 66 | 10/25/2026 |
| 10.7.0-pre-03 | 58 | 10/22/2026 |
| 10.7.0-pre-02 | 65 | 10/22/2026 |