FluentKit.Blazor
0.2.0
See the version list below for details.
dotnet add package FluentKit.Blazor --version 0.2.0
NuGet\Install-Package FluentKit.Blazor -Version 0.2.0
<PackageReference Include="FluentKit.Blazor" Version="0.2.0" />
<PackageVersion Include="FluentKit.Blazor" Version="0.2.0" />
<PackageReference Include="FluentKit.Blazor" />
paket add FluentKit.Blazor --version 0.2.0
#r "nuget: FluentKit.Blazor, 0.2.0"
#:package FluentKit.Blazor@0.2.0
#addin nuget:?package=FluentKit.Blazor&version=0.2.0
#tool nuget:?package=FluentKit.Blazor&version=0.2.0
<div align="center">
FluentKit
A token-accurate Fluent Design (WinUI 3) component library for Blazor
WebAssembly · Server · MAUI Blazor Hybrid — pure Razor and CSS, no third-party UI framework underneath
Live sample · Getting started · Known gaps · Third-party notices
</div> <img width="1912" height="1242" alt="image" src="https://github.com/user-attachments/assets/299a9235-6fc5-4eb4-9c92-64560ebd6cae" />
Design tokens (color, corner radius, state aliases) are transcribed directly from Microsoft's own
microsoft-ui-xaml resource dictionaries, and effects like Mica and Acrylic are rebuilt against
WinUI's actual effect graph rather than approximated from screenshots. See
THIRD_PARTY_NOTICES.md for exactly where each component's markup,
styling, or token values were sourced from.
Status: alpha — see the NuGet badge above for the current published version. APIs may still change between versions — see Known gaps.
Contents
- What's in here
- Getting started
- Running the sample
- Theming
- Project layout
- CSS isolation gotcha
- Known gaps / next up
- Contributing
- License
What's in here
<table> <tr> <td width="50%" valign="top">
Primitives — Buttons
FluentButton(4 variants × 4 states)FluentToggleButtonFluentIconButton
</td> <td width="50%" valign="top">
Primitives — Input
FluentTextBoxFluentPasswordBoxFluentNumberBoxFluentCheckBox(incl. indeterminate)FluentRadioButton/FluentRadioGroupFluentToggleSwitchFluentSlider
</td> </tr> <tr> <td width="50%" valign="top">
Primitives — Display
FluentTextBlock(full type ramp)FluentDividerFluentCardFluentExpanderFluentIconFluentPersonPicture
</td> <td width="50%" valign="top">
Primitives — Status & progress / collections
FluentProgressBarFluentProgressRingFluentInfoBadgeFluentInfoBarFluentListView
</td> </tr> <tr> <td width="50%" valign="top">
Composite — Overlays
FluentTooltipFluentFlyoutFluentMenuFlyout/FluentContextMenuFluentContentDialogFluentTeachingTip
</td> <td width="50%" valign="top">
Composite — Pickers & inputs
FluentComboBoxFluentAutoSuggestBoxFluentCalendarView/FluentCalendarDatePicker
</td> </tr> <tr> <td width="50%" valign="top">
Composite — Buttons with menus
FluentDropDownButtonFluentSplitButton
</td> <td width="50%" valign="top">
Composite — Navigation
FluentNavigationViewFluentMenuBarFluentPivot
</td> </tr> <tr> <td width="50%" valign="top">
Effects
FluentMicaPanel— opaque backdrop material: blurred wallpaper → luminosity blend → color tint → noise, rebuilt against WinUI's realBuildMicaEffectBrushgraphFluentAcrylicBrush— translucent, livebackdrop-filterblur,Base/ThinkindsFluentRevealBackground— pointer-tracked radial-gradient highlight
</td> <td width="50%" valign="top">
Theming
Light / dark / system, resolved through IThemeService, applied as data-theme on <html>, with
live updates on OS prefers-color-scheme changes.
Overlay infrastructure
IOverlayService + FluentOverlayHost + OverlaySurface — a portal layer for anything rendering
outside its parent's layout flow (tooltips, flyouts, context menus, teaching tips).
</td> </tr> </table>
Getting started
1. Install
Recommended — from NuGet:
dotnet add package FluentKit.Blazor
dotnet add package pins the exact current version automatically — the current published version
is always shown in the NuGet badge at the top of this README. If editing your .csproj by hand,
pin a specific version rather than using a floating wildcard, for reproducible builds:
<PackageReference Include="FluentKit.Blazor" Version="0.1.0-alpha" />
Alternatively, to track main directly, consume it as a project or repository reference instead:
git clone https://github.com/VibeNoobNotFound/FluentKit.git
<ItemGroup>
<ProjectReference Include="..\FluentKit\src\FluentKit\FluentKit.csproj" />
</ItemGroup>
2. Link the token stylesheet
wwwroot/index.html (WASM) or Pages/_Host.cshtml / App.razor (Server):
<link rel="stylesheet" href="_content/FluentKit/Tokens/tokens.css" />
3. Register theming
Program.cs:
builder.Services.AddScoped<IThemeService, ThemeService>();
4. Wrap your root component
<ThemeProvider>
<FluentOverlayHost>
@Body
</FluentOverlayHost>
</ThemeProvider>
ThemeProvider resolves and applies the theme on first render; FluentOverlayHost is required by
any composite control built on the overlay service (tooltips, flyouts, menus, dialogs, teaching tips).
5. Use components
<FluentButton Variant="FluentButtonVariant.Accent">Save changes</FluentButton>
Running the sample
samples/FluentKit.Sample.Wasm demos every component above, including theme switching, the page
background rendered through FluentMicaPanel over a real wallpaper image, Mica Base vs. Base Alt
side by side, and FluentAcrylicBrush cards live-blurring that Mica background behind them.
git clone https://github.com/VibeNoobNotFound/FluentKit.git
cd FluentKit
dotnet restore
dotnet run --project samples/FluentKit.Sample.Wasm
Requires the .NET 10 SDK. A hosted build is also published to vibenoobnotfound.github.io/FluentKit.
Theming
Three modes, matching WinUI: System (tracks the OS/browser preference live), Light, and Dark.
@inject IThemeService ThemeService
await ThemeService.SetModeAsync(ThemeMode.Dark);
The token layer is split so consumers only ever need to link one file:
| File | Purpose |
|---|---|
_primitives.css |
Theme-independent primitive values (raw color ramps, spacing, corner radius) |
_semantic.light.css / _semantic.dark.css |
Semantic aliases transcribed from WinUI's own XAML resource dictionaries, mirrored property-for-property |
tokens.css |
Single entry point importing both layers — the only file consumers should link directly |
Project layout
src/FluentKit/
Theming/ IThemeService, ThemeProvider, theme-interop.js
Primitives/ One folder per primitive component (.razor / .razor.cs / .razor.css)
Composite/ One folder per composite control, built on Overlay/ where applicable
Overlay/ IOverlayService, FluentOverlayHost, OverlaySurface
Effects/ Mica, Acrylic, Reveal
wwwroot/ Tokens, per-component JS interop modules, icon webfont
samples/
FluentKit.Sample.Wasm/ Blazor WASM host demoing every component
Each component folder follows the same three-file convention: .razor for markup, .razor.cs for
the code-behind, .razor.css for CSS-isolated styles. Components that need pointer/DOM measurement
(drag tracking, overlay positioning, pointer-relative gradients) pair with a small JS interop module
under wwwroot/, matched folder-for-folder with the component that consumes it.
CSS isolation gotcha
A Razor Class Library's own component-scoped stylesheet (_content/FluentKit/FluentKit.bundle.scp.css)
is not meant to be linked directly and will 404 if you try. The host app's build generates its own
bundle ({HostAssemblyName}.styles.css, served flat from the app's own root) which internally
@imports every referenced RCL's bundle. Only link the host app's own generated stylesheet — see
samples/FluentKit.Sample.Wasm/wwwroot/index.html for a working example.
Related: any markup built via
RenderTreeBuilderin a.csfile does not get a component's CSS isolation scope attribute, so.razor.cssstyles silently won't apply to it. Define dynamically-shown markup as Razor template fields (RenderFragment x = @<span>...</span>;) inside the.razorfile's@codeblock instead.
Known gaps / next up
- Accent color tokens (
--accent-fill-color-defaultetc.) are still placeholders (Windows' default blue), not derived from the user's actual system accent color — flaggedTODOin both_semantic.*.cssfiles. - No automated tests yet (
tests/doesn't exist) — bUnit plus Playwright screenshot tests pinned against real WinUI 3 screenshots are planned. - No published docs/demo site yet, beyond the sample app.
- No High Contrast theme (a third theme alongside light/dark, mirroring WinUI's own
HighContrastresource key) —Theming/currently only resolves light/dark/system. overlay-interop.jsonly flips vertically (below to above); full 4-direction collision handling (left/right flipping too) hasn't been needed yet, but would matter for a dropdown pinned near a viewport edge.FluentTeachingTip's beak is positioned from the requested placement, not whateveroverlay-interop.jsactually flipped it to — fine as long as there's room, but the beak won't flip sides if the tip itself gets flipped.
Contributing
Issues and pull requests are welcome. If you're adding or changing a component, please also update THIRD_PARTY_NOTICES.md when markup, styling structure, or token values are derived from an external source.
License
MIT — see LICENSE. See THIRD_PARTY_NOTICES.md for attribution of design tokens, ported component structure, and bundled assets (fluent-svelte, microsoft-ui-xaml, Fluent System Icons).
| 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
- Microsoft.AspNetCore.Components.Web (>= 10.0.10)
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 |
|---|---|---|
| 0.2.2 | 42 | 7/16/2026 |
| 0.2.1 | 43 | 7/16/2026 |
| 0.2.0 | 43 | 7/15/2026 |
| 0.2.0-alpha | 37 | 7/15/2026 |
| 0.1.8 | 41 | 7/15/2026 |
| 0.1.7 | 43 | 7/15/2026 |
| 0.1.6 | 48 | 7/15/2026 |
| 0.1.5-alpha | 44 | 7/15/2026 |
| 0.1.3-alpha | 36 | 7/15/2026 |
| 0.1.2-alpha | 36 | 7/14/2026 |
| 0.1.1-alpha | 37 | 7/14/2026 |
| 0.1.0-alpha | 46 | 7/14/2026 |