Circuids.Bridge.Blazor 1.0.1

Prefix Reserved
dotnet add package Circuids.Bridge.Blazor --version 1.0.1
                    
NuGet\Install-Package Circuids.Bridge.Blazor -Version 1.0.1
                    
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="Circuids.Bridge.Blazor" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Circuids.Bridge.Blazor" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Circuids.Bridge.Blazor" />
                    
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 Circuids.Bridge.Blazor --version 1.0.1
                    
#r "nuget: Circuids.Bridge.Blazor, 1.0.1"
                    
#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 Circuids.Bridge.Blazor@1.0.1
                    
#: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=Circuids.Bridge.Blazor&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Circuids.Bridge.Blazor&version=1.0.1
                    
Install as a Cake Tool

Circuids.Bridge.Blazor

Circuids.Bridge.Blazor is the Bridge host package for Blazor WebAssembly and Blazor Server. It registers browser-backed implementations for Bridge's shared services so Razor components can adapt to host, platform, form factor, connectivity, theme, and safe-area state.

Install this package in the Blazor app that runs your UI. Shared Razor Class Libraries can reference Circuids.Bridge directly, or rely on this package transitively from the host app.

Install

dotnet add package Circuids.Bridge.Blazor

Register Services

Blazor WebAssembly

using Circuids.Bridge.Blazor;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;

var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");

builder.Services.AddBridgeForBlazor();

await builder.Build().RunAsync();

Blazor Server

using Circuids.Bridge.Blazor;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddRazorComponents()
    .AddInteractiveServerComponents();
builder.Services.AddBridgeForBlazor();

var app = builder.Build();

app.MapRazorComponents<App>()
    .AddInteractiveServerRenderMode();

app.Run();

Bridge initializes after the interactive Blazor runtime is available. In Blazor Server apps that use static prerendering, Bridge components render with default values first and then update after the circuit connects.

Add The Provider

Wrap the layout or root subtree that should receive initialized Bridge state.

@using Circuids.Bridge

<BridgeProvider>
    @Body
</BridgeProvider>

BridgeProvider initializes services in this order: host/platform, form factor, connectivity, theme, and safe area.

Use In Components

@using Circuids.Bridge

<BridgeFormFactor @bind-FormFactor="currentFormFactor" Context="viewport">
    <span>@viewport.Width x @viewport.Height</span>

    <Phone>
        <MobileDashboard />
    </Phone>
    <Desktop>
        <DesktopDashboard />
    </Desktop>
    <Default>
        <CompactDashboard />
    </Default>
</BridgeFormFactor>

<BridgeConnectivity @bind-IsConnected="isConnected">
    <Online>
        <SyncStatus />
    </Online>
    <Offline>
        <OfflineBanner />
    </Offline>
</BridgeConnectivity>

@code {
    private FormFactorInfo currentFormFactor = FormFactorInfo.Unknown();
    private bool isConnected;
}

Plain child content receives the current context. Named slots such as Phone, Desktop, Online, and Offline are simple branch fragments.

Safe Area On Web

For web safe-area insets, add viewport-fit=cover to your host page.

<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">

Without that value, browsers report zero safe-area insets.

Package Relationship

Package Use
Circuids.Bridge Core contracts and Razor components for shared libraries.
Circuids.Bridge.Blazor Blazor WebAssembly and Blazor Server host implementation.
Circuids.Bridge.Maui MAUI Blazor Hybrid host implementation.

Learn More

Product Compatible and additional computed target framework versions.
.NET 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
1.0.1 114 5/24/2026
1.0.0 106 4/27/2026

1.0.0

Initial stable release of the Bridge Blazor host package.

- Added AddBridgeForBlazor for Blazor WebAssembly and Blazor Server apps.
- Added browser-backed implementations for host/platform, form factor, connectivity, theme, and safe-area services.
- Added ES module based JavaScript interop for runtime detection and change notifications.
- Supports component-driven responsive rendering, online/offline UI, theme-aware UI, and web safe-area insets.
- Handles Blazor Server circuit disconnects during JS interop disposal.
- References Circuids.Bridge transitively, so host apps do not need to install the core package separately.