Soenneker.Blazor.Floating.Windows
3.0.2
Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Soenneker.Blazor.Floating.Windows --version 3.0.2
NuGet\Install-Package Soenneker.Blazor.Floating.Windows -Version 3.0.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="Soenneker.Blazor.Floating.Windows" Version="3.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Blazor.Floating.Windows" Version="3.0.2" />
<PackageReference Include="Soenneker.Blazor.Floating.Windows" />
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 Soenneker.Blazor.Floating.Windows --version 3.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Soenneker.Blazor.Floating.Windows, 3.0.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 Soenneker.Blazor.Floating.Windows@3.0.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=Soenneker.Blazor.Floating.Windows&version=3.0.2
#tool nuget:?package=Soenneker.Blazor.Floating.Windows&version=3.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Soenneker.Blazor.Floating.Windows
A Blazor component library for creating draggable, resizable floating windows with modern styling and full customization options.
Features
- ✅ Draggable Windows - Drag windows by their title bar
- ✅ Resizable Windows - Resize by dragging edges and corners
- ✅ Modern Styling - Beautiful gradient title bars and smooth animations
- ✅ Customizable - Full control over appearance and behavior
- ✅ Viewport Constraints - Keep windows within screen bounds
- ✅ Z-Index Management - Automatic focus and layering
- ✅ Responsive Design - Works on desktop and mobile
- ✅ Dark Mode Support - Automatic theme detection
- ✅ Accessibility - Proper ARIA labels and keyboard support
- ✅ Event Callbacks - React to show, hide, drag, and resize events
Installation
- Add the NuGet package to your project:
dotnet add package Soenneker.Blazor.Floating.Windows
- Register the services in your
Program.cs
:
using Soenneker.Blazor.Floating.Windows.Registrars;
builder.Services.AddFloatingWindowAsScoped();
- Add the using statement to your
_Imports.razor
:
@using Soenneker.Blazor.Floating.Windows
@using Soenneker.Blazor.Floating.Windows.Options
Basic Usage
<FloatingWindow Title="My Window" Width="400" Height="300">
<div>
<h3>Hello World!</h3>
<p>This is a floating window with your content.</p>
<button @onclick="() => window?.Close()">Close</button>
</div>
</FloatingWindow>
Advanced Usage
<FloatingWindow @ref="myWindow"
Title="Advanced Window"
Width="500"
Height="400"
InitialX="100"
InitialY="100"
Draggable="true"
Resizable="true"
ShowCloseButton="true"
ShowTitleBar="true"
CenterOnShow="true"
ConstrainToViewport="true"
OnShow="OnWindowShow"
OnHide="OnWindowHide"
OnDragStart="OnDragStart"
OnDragEnd="OnDragEnd">
<div class="window-content">
<h3>Advanced Features</h3>
<p>This window demonstrates all the available features.</p>
<div class="controls">
<button @onclick="() => myWindow?.SetPosition(200, 200)">Move to (200,200)</button>
<button @onclick="() => myWindow?.SetSize(600, 500)">Resize to 600x500</button>
<button @onclick="() => myWindow?.BringToFront()">Bring to Front</button>
</div>
</div>
</FloatingWindow>
@code {
private FloatingWindow? myWindow;
private void OnWindowShow()
{
Console.WriteLine("Window shown!");
}
private void OnWindowHide()
{
Console.WriteLine("Window hidden!");
}
private void OnDragStart()
{
Console.WriteLine("Dragging started!");
}
private void OnDragEnd()
{
Console.WriteLine("Dragging ended!");
}
}
Configuration Options
Window Properties
Property | Type | Default | Description |
---|---|---|---|
Title |
string |
"Window" |
The title displayed in the title bar |
Width |
int? |
400 |
Initial width in pixels |
Height |
int? |
300 |
Initial height in pixels |
InitialX |
int? |
100 |
Initial X position |
InitialY |
int? |
100 |
Initial Y position |
Draggable |
bool? |
true |
Whether the window can be dragged |
Resizable |
bool? |
true |
Whether the window can be resized |
ShowCloseButton |
bool? |
true |
Whether to show the close button |
ShowTitleBar |
bool? |
true |
Whether to show the title bar |
Event Callbacks
Event | Description |
---|---|
OnShow |
Triggered when the window becomes visible |
OnHide |
Triggered when the window becomes hidden |
OnDragStart |
Triggered when dragging begins |
OnDragEnd |
Triggered when dragging ends |
Methods
Method | Description |
---|---|
Show() |
Shows the window |
Hide() |
Hides the window |
Toggle() |
Toggles window visibility |
Close() |
Hides and disposes the window |
GetPosition() |
Returns current (x, y) position |
SetPosition(x, y) |
Sets the window position |
GetSize() |
Returns current (width, height) |
SetSize(width, height) |
Sets the window size |
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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 was computed. 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.
-
net9.0
- Intellenum (>= 1.0.6)
- Microsoft.AspNetCore.Components.Web (>= 9.0.7)
- Soenneker.Blazor.Extensions.EventCallback (>= 3.0.418)
- Soenneker.Blazor.Utils.ResourceLoader (>= 3.0.1481)
- Soenneker.Extensions.String (>= 3.0.539)
- Soenneker.Utils.Json (>= 3.0.2339)
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 |
---|---|---|
3.0.29 | 20 | 8/22/2025 |
3.0.28 | 100 | 8/17/2025 |
3.0.27 | 112 | 8/15/2025 |
3.0.26 | 129 | 8/12/2025 |
3.0.25 | 124 | 8/12/2025 |
3.0.24 | 126 | 8/12/2025 |
3.0.23 | 127 | 8/12/2025 |
3.0.22 | 137 | 8/11/2025 |
3.0.21 | 123 | 8/11/2025 |
3.0.20 | 118 | 8/11/2025 |
3.0.19 | 125 | 8/11/2025 |
3.0.18 | 122 | 8/11/2025 |
3.0.17 | 204 | 8/7/2025 |
3.0.16 | 206 | 8/6/2025 |
3.0.15 | 210 | 8/5/2025 |
3.0.14 | 209 | 8/5/2025 |
3.0.13 | 210 | 8/5/2025 |
3.0.12 | 207 | 8/5/2025 |
3.0.11 | 193 | 8/5/2025 |
3.0.10 | 95 | 7/29/2025 |
3.0.9 | 440 | 7/24/2025 |
3.0.8 | 124 | 7/16/2025 |
3.0.7 | 136 | 7/16/2025 |
3.0.6 | 145 | 7/14/2025 |
3.0.5 | 131 | 7/14/2025 |
3.0.4 | 131 | 7/14/2025 |
3.0.3 | 134 | 7/14/2025 |
3.0.2 | 133 | 7/14/2025 |
3.0.1 | 134 | 7/13/2025 |