CanDoItAll.Components.OverlayLib
0.1.15
dotnet add package CanDoItAll.Components.OverlayLib --version 0.1.15
NuGet\Install-Package CanDoItAll.Components.OverlayLib -Version 0.1.15
<PackageReference Include="CanDoItAll.Components.OverlayLib" Version="0.1.15" />
<PackageVersion Include="CanDoItAll.Components.OverlayLib" Version="0.1.15" />
<PackageReference Include="CanDoItAll.Components.OverlayLib" />
paket add CanDoItAll.Components.OverlayLib --version 0.1.15
#r "nuget: CanDoItAll.Components.OverlayLib, 0.1.15"
#:package CanDoItAll.Components.OverlayLib@0.1.15
#addin nuget:?package=CanDoItAll.Components.OverlayLib&version=0.1.15
#tool nuget:?package=CanDoItAll.Components.OverlayLib&version=0.1.15
CanDoItAll.Components.OverlayLib
OverlayLib supplies floating, task-focused windows for Blazor pages. Use it when a user needs a supporting tool - an inspector, filter panel, live status, or preview - without navigating away from the current work.
OverlayWindow is deliberately bounded: it lives inside a host frame, can respect a toolbar/safe-top area, and provides consistent drag, resize, minimize, reset, hide, and show behavior. It complements normal page content; it should not become a replacement for page navigation or an unbounded desktop-window imitation.
Add it once
Import the namespace and include the generated assets in the host document. This has no npm runtime dependency.
@using CanDoItAll.Components.OverlayLib
@* App.razor *@
<head>
...
<OverlayLibHeadAssets />
</head>
<body>
...
<OverlayLibBodyAssets IncludeRuntimeAssets="true" />
</body>
A bounded floating inspector
The host frame must be positioned and have a meaningful size. Pass selectors for the container and, when present, the toolbar that the window must not cover. Store OverlayWindowState in the page or feature state; the StateChanged callback is where drag, resize, and visibility changes come back to your application.
<div class="relative min-h-[28rem] overflow-hidden rounded-2xl border"
data-testid="review-frame">
<header class="relative z-10 border-b p-3" data-testid="review-toolbar">
Review tools
</header>
<section class="p-6">Your ordinary page content remains here.</section>
@if (inspector.IsVisible)
{
<OverlayWindow WindowId="review-inspector"
Title="Inspector"
Summary="Supporting context for this review."
State="@inspector"
StateChanged="HandleInspectorChanged"
DefaultPlacement="top-right"
ContainerSelector="[data-testid='review-frame']"
SafeTopSelector="[data-testid='review-toolbar']">
<TextBlock TextStyle="TextStyle.Body2"
Value="This panel can move without taking the user away from the page." />
</OverlayWindow>
}
</div>
@code {
private OverlayWindowState inspector = new();
private Task HandleInspectorChanged(OverlayWindowState next)
{
inspector = OverlayWindowState.Normalize(next);
return Task.CompletedTask;
}
}
OverlayLib and CanvasLib
OverlayLib owns the generic window lifecycle and browser runtime. CanvasLib uses it through CanvasFloatingWindow, adding a canvas-specific state type and default stage boundaries. Use OverlayWindow on ordinary pages; use CanvasFloatingWindow inside CanvasWorkbench.OverlayContent when the panel belongs to a workbench. See the Canvas guide for that composition.
See it running
The Sandbox route /groups/overlays renders a standard BaseLib review frame with a real OverlayWindow. It is the visual reference for bounded placement, safe-top behavior, and hide/show/minimize flows. The companion Canvas example lives at /groups/canvas.
Development
dotnet build src/CanDoItAll.Components.OverlayLib/CanDoItAll.Components.OverlayLib.csproj --no-restore
dotnet test tests/CanDoItAll.Components.BaseLib.Tests/CanDoItAll.Components.BaseLib.Tests.csproj --filter FullyQualifiedName~CanvasOverlayPublishingApprovalTests --no-restore
Targets net10.0. The package references BaseLib and Microsoft.AspNetCore.Components.Web; it requires no npm runtime package.
| Product | Versions 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. |
-
net10.0
- CanDoItAll.Components.BaseLib (>= 0.1.15)
- Microsoft.AspNetCore.Components.Web (>= 10.0.10)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on CanDoItAll.Components.OverlayLib:
| Package | Downloads |
|---|---|
|
CanDoItAll.Components.CanvasLib
Canonical shared canvas runtime for active CanDoItAll workbench surfaces. |
|
|
CanDoItAll.Components.WebGlLib
Universal WebGL workbench concept runtime with typed scene contracts and deterministic browser proof hooks. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.15 | 98 | 7/24/2026 |