MewUI

Desktop apps in C#, shipped as one small native file.

A cross-platform, code-first .NET GUI framework. Apps publish as a single native executable of a few megabytes and run with no .NET runtime installed. No XAML, no designer.

Run the demo in your browserGitHub654NuGet12.9K

MIT licensed. .NET 8.0 and 10.0. Latest release 0.20.2.

The MewUI Gallery sample with the light themeThe same sample with the dark themeLightDark
Move across to compare, click to see the whole window. One theme object, switched at runtime.
The MewUI Gallery sample with the light themeThe same sample with the dark themeLightDark

Try it before you install anything

Three ways in, ordered by what they ask of you.

  1. 1

    In your browser

    Nothing to install. The Gallery sample is the same code compiled to WebAssembly.

  2. 2

    One command

    Needs the .NET 10 SDK, nothing else. No clone, no project, no template. This downloads and runs code from GitHub.

    curl -sL https://raw.githubusercontent.com/aprillz/MewUI/refs/heads/main/samples/FBASample/fba_gallery.cs -o - | dotnet run -
  3. 3

    In your own project

    One metapackage brings the core, the platform hosts and the rendering backends.

    dotnet add package Aprillz.MewUI

Why MewUI

The framework optimizes for one thing: a small, self contained desktop app that starts fast.

NativeAOT and trimming first

Explicit code paths and source generated interop, with no reflection based binding. Publish one native executable that runs without a .NET runtime installed.

Small by design

A Hello World window publishes at 3.24 MB, and the full control gallery at 7.65 MB. Every figure on this page is measured, not estimated.

C# markup, no XAML

Build the UI tree with a fluent API in plain C#. No markup compiler, no designer, no second language to learn.

One codebase, four targets

Windows, Linux/X11 and macOS desktop hosts, plus a WebAssembly build that runs the same UI in the browser.

Measured, not claimed

Every number here is the main executable of a NativeAOT publish, measured by the repository's own size tooling. Binary units, so 1 MB is 1024 KB.

3.24 MB

Hello World, Windows x64 / GDI

7.65 MB

Gallery, the full control showcase

Platform / backendHello WorldGallery
Windows x64 / GDI3.24 MB7.65 MB
Windows x64 / Direct2D3.39 MB7.78 MB
Windows x64 / MewVG3.53 MB7.96 MB
macOS arm64 / MewVG3.32 MB7.11 MB
Linux x64 / X11 + MewVG4.36 MB8.98 MB

The whole app is C#

Controls are composed with a fluent API. There is no markup file, no designer and no generated partial class behind the window.

var window = new Window()
    .Title("Hello MewUI")
    .Resizable(520, 360)
    .Padding(12)
    .Content(
        new StackPanel()
            .Spacing(8)
            .Children(
                new Label()
                    .Text("Hello, Aprillz.MewUI")
                    .FontSize(18)
                    .Bold(),
                new Button()
                    .Content("Exit")
                    .OnClick(Application.Shutdown)));

Application.Run(window);

Bindings without reflection

A source is an observable value, an ordinary INotifyPropertyChanged view model, or another element's property. Dotted paths are decomposed into per step subscriptions at compile time, so trimming and AOT keep working.

var percent = new ObservableValue<double>(
    initialValue: 0.25,
    coerce: value => Math.Clamp(value, 0, 1));

var slider = new Slider()
    .BindValue(percent);

var label = new Label()
    .BindText(percent, value => $"Percent ({value:P0})");

Tools while you build

Code first does not mean flying blind. The preview draws your window in the editor, and the running app takes your edits as you type.

Editor preview

Renders a Window or UserControl in an editor panel without launching the app. The session builds once, then every save redraws the panel.

Hot reload

Run under dotnet watch and edits reach the running app. MewUI rebuilds only the nodes whose build code changed, and nothing is declared to enable it.

DevTools

An element inspector, a visual tree window, a frame statistics overlay and a profiler timeline. On by default in Debug, off in Release.

Analyzers

Roslyn analyzers and refactorings for fluent markup: turn an object initializer into a chain, expand or collapse one, merge statements into it. Build time only, so nothing reaches the published output.

Built to be driven by coding agents

MewUI ships an agent skill for Claude Code, Codex and GitHub Copilot. It gives the agent the facts it would otherwise guess, so what it writes compiles.

Controls you expect, in the box

Buttons, text input, lists, trees, grids, tabs, menus, toolbars, pickers, navigation, and the panels to lay them out. The Gallery sample exercises all of them, and it runs in the browser with no install.

ButtonsButtonToggleButtonRepeatButtonSplitButtonDropDownButton
TextLabelTextBlockTextBoxMultiLineTextBoxPasswordBoxSyntaxViewer
SelectionCheckBoxRadioButtonToggleSwitchComboBoxListBox
DataTreeViewGridView
ValuesSliderProgressBarProgressRingNumericUpDownColorPickerDatePickerCalendar
ContainersTabControlGroupBoxExpanderBorderScrollViewerNavigationView
Menus and barsMenuBarContextMenuToolTipToolBar
MediaImage
AppWindowDispatcherTimer
PanelsGridStackPanelDockPanelUniformGridWrapPanelCanvasSplitPanel
Open the GalleryBrowse the samples

Optional extensions

The core stays thin. Larger features ship as separate packages you reference only when you need them.

MewDock

Visual Studio style docking: document and tool tabs, drag rearranging, splits, auto hide, popouts.

SVG

Pure C# SVG parsing and rendering. No System.Drawing, AOT compatible.

Skia

SkiaCanvasView for drawing with SkiaSharp, with zero copy GPU interop per backend.

MewCharts

Cartesian, pie and polar charts on the LiveChartsCore engine, without a SkiaSharp dependency.

WebView2

Win32 WebView2 control. Requires the Microsoft Edge WebView2 runtime.

Platforms and rendering backends

Windowing runs through a platform host, drawing through a backend. Pick one backend at publish time to trim the rest away.

PlatformHostBackends
Windows 10+Win32Direct2D, GDI, MewVG
LinuxX11MewVG (OpenGL)
macOS 12+AppKitMewVG (Metal)
BrowserWebAssemblyMewVG (WebGL2)

Where the project stands

MewUI is at 0.20.2 and under active development. The public API is still being stabilized, so breaking changes can land between minor releases. Pin your package version and read the release notes before upgrading.

Release notes

Documentation

In English and Korean.