Bit.Butil
10.4.2
dotnet add package Bit.Butil --version 10.4.2
NuGet\Install-Package Bit.Butil -Version 10.4.2
<PackageReference Include="Bit.Butil" Version="10.4.2" />
<PackageVersion Include="Bit.Butil" Version="10.4.2" />
<PackageReference Include="Bit.Butil" />
paket add Bit.Butil --version 10.4.2
#r "nuget: Bit.Butil, 10.4.2"
#:package Bit.Butil@10.4.2
#addin nuget:?package=Bit.Butil&version=10.4.2
#tool nuget:?package=Bit.Butil&version=10.4.2
bit Butil
bit Blazor Utilities for JavaScript
To start using Butil you first need to install the NuGet package:
dotnet add package Bit.Butil
then add its script tag to your app:
<script src="_content/Bit.Butil/bit-butil.js"></script>
you also need to add its services like this:
using Bit.Butil;
...
builder.Services.AddBitButilServices();
...
Now you can inject its classes to use the utilities.
Window
To use a representation of the DOM's window object in C# you can inject the Bit.Butil.Window class:
@inject Bit.Butil.Window window
...
@code {
...
await window.AddEventListener(ButilEvents.KeyDown, args => { ... });
...
}
Document
To use a representation of the DOM's document object in C# you can inject the Bit.Butil.Document class:
@inject Bit.Butil.Document document
...
@code {
...
await document.AddEventListener(ButilEvents.Click, args => { ... });
...
}
Keyboard
In Butil there is a special class to work with keyboard and short keys. you can use this class by inejcting the Bit.Butil.Keyboard class:
@inject Bit.Butil.Keyboard keyboard
...
@code {
...
await keyboard.Add("F10", args => { ... }, , ButilModifiers.Alt | ButilModifiers.Ctrl);
...
}
Console
To use the browser console features you can try injecting the Bit.Butil.Console class like this:
@inject Bit.Butil.Console console
...
@code {
...
console.Log("This is a test log:", someValue);
console.Assert(condition, "The condition failed!", testedValue);
console.Error("This is a test error:", value);
...
}
| 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. |
-
net10.0
- Microsoft.AspNetCore.Components.Web (>= 10.0.0)
-
net8.0
- Microsoft.AspNetCore.Components.Web (>= 8.0.0)
-
net9.0
- Microsoft.AspNetCore.Components.Web (>= 9.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 |
|---|---|---|
| 10.4.2 | 138 | 2/10/2026 |
| 10.4.2-pre-02 | 49 | 2/10/2026 |
| 10.4.2-pre-01 | 169 | 2/8/2026 |
| 10.4.1 | 227 | 2/4/2026 |
| 10.4.1-pre-01 | 132 | 2/2/2026 |
| 10.4.0 | 621 | 1/20/2026 |
| 10.3.0 | 500 | 1/2/2026 |
| 10.3.0-pre-01 | 142 | 12/31/2025 |
| 10.2.1 | 438 | 12/19/2025 |
| 10.2.1-pre-03 | 299 | 12/18/2025 |
| 10.2.1-pre-02 | 276 | 12/17/2025 |
| 10.2.1-pre-01 | 460 | 12/11/2025 |
| 10.2.0 | 1,245 | 12/3/2025 |
| 10.2.0-pre-02 | 681 | 12/2/2025 |
| 10.2.0-pre-01 | 651 | 11/30/2025 |
| 10.1.1 | 621 | 11/21/2025 |
| 10.1.1-pre-01 | 312 | 11/21/2025 |
| 10.1.0 | 612 | 11/19/2025 |
| 10.1.0-pre-02 | 413 | 11/17/2025 |
| 10.1.0-pre-01 | 325 | 11/14/2025 |