Skip to content
/ DeskUI Public

A lightweight Razor Class Library providing a fully interactive desktop‑style UI for Blazor: draggable windows, multi‑window management, theming, and modular components.

License

Notifications You must be signed in to change notification settings

guillaC/DeskUI

Repository files navigation

DeskUI

Blazor NuGet
Stars License

OS-like multi window system for Blazor applications.
A reusable Razor Class Library providing draggable, resizable, focusable windows — just like a real desktop environment, with zero external dependencies.

Features

  • Draggable, resizable, focusable multi-window system
  • Modal & overlay support with zero external dependencies
  • Built-in theming (light, dark, Windows CE) + full CSS variable customization
  • Works with Blazor Server, WebAssembly, and Hybrid

Demo

Animation

Projects

  • DeskUI core RCL providing the full windowing system
  • DeskUI.DemoRCL reusable demo RCL consumed by the demo apps
  • DeskUI.DemoServer Blazor Server demo
  • DeskUI.DemoWASM Blazor WebAssembly demo

Setup (Blazor Server / WebAssembly)

  • Import the namespace in _Imports.razor
@using DeskUI
  • Add the window host in your main page (e.g. Index.razor) ClassicLight is the default theme, but you can specify another one:
<WindowHost Theme="@Themes.ClassicLight" />
  • Import the theme stylesheet:
<link rel="stylesheet" href="_content/DeskUI/themes.css" />
  • Register scripts:
<script src="_content/DeskUI/drag.js"/>

Usage

async Task OpenFirstWindow()
{
    await WindowManager.OpenWindowAsync("FirstComponent", builder =>
    {
        builder.OpenComponent<FirstForm>(0);
        builder.CloseComponent();
    }, width: 240, height: 320);
}

async Task OpenSecondWindow()
{
    await WindowManager.OpenWindowAsync("SecondComponent (Modal)", builder =>
    {
        builder.OpenComponent<SecondForm>(0);
        builder.CloseComponent();
    }, width: 550, height: 250, allowClose: false, overlayed: true);
}

Theme Support

DeskUI includes a full CSS variable based theming system. You can choose one of the built-in themes or define your own.

Available built-in themes:

  • Themes.ClassicLight
  • Themes.ClassicDark
  • Themes.WindowsCE

Create your own theme

You can override any of the theme variables defined in themes.css.

.my-custom-theme {
    --win-bg: #fafafa;
    --header-bg: #e8e8e8;
    --close-color: #444;
    /* ...override any variables you want... */
}

Then apply it:

<WindowHost Theme="my-custom-theme" />

NuGet

DeskUI is available on NuGet.org

Install via .NET CLI:

dotnet add package DeskUI

License

This project is licensed under the MIT License – see the LICENSE file for details.

About

A lightweight Razor Class Library providing a fully interactive desktop‑style UI for Blazor: draggable windows, multi‑window management, theming, and modular components.

Topics

Resources

License

Stars

Watchers

Forks