WaxUI 1.2.2

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

WaxUI

A UI component library for Blazor, styled with Khamsin utility CSS and light/dark mode support.

Components: Accordion, Alert, Avatar, Badge, Breadcrumb, Button, Card, Checkbox, Chip, Channel Button, Color Picker, Date Picker, Dialog, Drop Overlay, Dropzone, Empty State, Fab, Icon Button, Navigation (Sidebar, Server Button), Popover, Progress, QR Code, Radio, Reaction Chip, Section Heading, Select, Setting Row, Slider, Spoiler, Switch, Tabs, Text Field.

Install

dotnet add package WaxUI

Setup

Register the services in Program.cs:

builder.Services.AddWaxUI();

Add Khamsin to projects that write utility classes, then link the generated stylesheet and theme support in App.razor:

dotnet add package Khamsin --version 0.4.0
<link rel="stylesheet" href="khamsin.css" />
<FontMap />
<ThemePreloader />

khamsin.css contains the theme, Khamsin's preflight, WaxUI's base styles and only the utilities the app renders. Blazor Server apps can serve it from an endpoint instead with app.MapKhamsinCss().

Usage

<WaxButton Variant="WaxButtonVariant.Filled" OnClick="OnClick">
    <ChildContent>Click me</ChildContent>
</WaxButton>

<WaxBadge Color="WaxColor.Primary">New</WaxBadge>

<WaxSwitch Label="Dark mode" />
private void OnClick() { }

Custom colors

Components that accept a WaxColor (Badge, Progress Bar, Slider) also accept custom theme tokens and explicit CSS colors:

@code {
    // Resolved as var(--brand); define --brand in your theme.
    private static readonly WaxColor Brand = new("brand");
    // Any CSS color value works.
    private static readonly WaxColor BrandHex = WaxColor.Custom("#7B5EA7");
}

<WaxBadge Color="Brand">Brand</WaxBadge>
<WaxBadge Color="BrandHex">Custom hex</WaxBadge>

Filled custom tokens use --{token}-foreground when defined; otherwise white is used for the text.

Theming

Inject IThemeService to change the theme at runtime:

@inject IThemeService Theme

<button @onclick="() => Theme.ToggleDarkLightAsync()">Toggle theme</button>

Modes: ThemeMode.System, ThemeMode.Light, ThemeMode.Dark.

Runtime services

AddWaxUI() registers scoped services for UI that lives outside the component that opens it. The overlay services need their outlet rendered once in the interactive layout; ThemePreloader belongs in the document head.

Service Host Purpose
IThemeService ThemePreloader Read/toggle the current light/dark/system theme.
IWaxDialogService WaxDialogOutlet Await typed dialog, confirm and prompt results.
IWaxAlertService WaxAlertOutlet Transient or persistent stacked alerts/toasts.
IWaxPopoverService WaxPopoverOutlet Anchored popovers opened from code or a selector.
IWaxMenuService WaxMenuOutlet Context menus that complete with the selected row.
<WaxDialogOutlet @rendermode="InteractiveServer" />
<WaxAlertOutlet @rendermode="InteractiveServer" />
<WaxPopoverOutlet @rendermode="InteractiveServer" />
<WaxMenuOutlet @rendermode="InteractiveServer" />
@inject IWaxAlertService Alerts

Alerts.Success("Your changes have been saved.");
Alerts.Error("The upload failed. Please try again.");
@inject IWaxPopoverService Popovers

private ElementReference _anchor;

private Task OpenAsync() => Popovers.ShowAsync(
    _anchor,
    @<div class="w-64 p-3">Anchored content</div>,
    new WaxPopoverOptions { ShowArrow = true });
@inject IWaxMenuService Menus

private async Task OpenMenuAsync(MouseEventArgs e)
{
    var index = await Menus.ShowAsync(new WaxMenuOptions
    {
        HeaderLabel = "design-team",
        HeaderKind = "channel",
        Items = [new("Copy link", "link"), new("Delete", "trash-2", danger: true)],
    }, e);

    // index: selected row, or null when dismissed
}
Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
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.2.2 47 11/14/2026
1.2.1 45 11/13/2026
1.2.0 62 11/10/2026
1.1.2 88 11/7/2026
1.1.1 88 11/7/2026
1.1.0 87 11/7/2026
1.0.0 100 11/5/2026