Bit.Butil 10.4.2

dotnet add package Bit.Butil --version 10.4.2
                    
NuGet\Install-Package Bit.Butil -Version 10.4.2
                    
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="Bit.Butil" Version="10.4.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bit.Butil" Version="10.4.2" />
                    
Directory.Packages.props
<PackageReference Include="Bit.Butil" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Bit.Butil --version 10.4.2
                    
#r "nuget: Bit.Butil, 10.4.2"
                    
#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.
#:package Bit.Butil@10.4.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Bit.Butil&version=10.4.2
                    
Install as a Cake Addin
#tool nuget:?package=Bit.Butil&version=10.4.2
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed