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.


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.
MIT licensed. .NET 8.0 and 10.0. Latest release 0.20.2.

LightDarkThree ways in, ordered by what they ask of you.
Nothing to install. The Gallery sample is the same code compiled to WebAssembly.
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 -One metapackage brings the core, the platform hosts and the rendering backends.
dotnet add package Aprillz.MewUIThe framework optimizes for one thing: a small, self contained desktop app that starts fast.
Explicit code paths and source generated interop, with no reflection based binding. Publish one native executable that runs without a .NET runtime installed.
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.
Build the UI tree with a fluent API in plain C#. No markup compiler, no designer, no second language to learn.
Windows, Linux/X11 and macOS desktop hosts, plus a WebAssembly build that runs the same UI in the browser.
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.
Hello World, Windows x64 / GDI
Gallery, the full control showcase
| Platform / backend | Hello World | Gallery |
|---|---|---|
| Windows x64 / GDI | 3.24 MB | 7.65 MB |
| Windows x64 / Direct2D | 3.39 MB | 7.78 MB |
| Windows x64 / MewVG | 3.53 MB | 7.96 MB |
| macOS arm64 / MewVG | 3.32 MB | 7.11 MB |
| Linux x64 / X11 + MewVG | 4.36 MB | 8.98 MB |
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);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})");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.
Renders a Window or UserControl in an editor panel without launching the app. The session builds once, then every save redraws the panel.
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.
An element inspector, a visual tree window, a frame statistics overlay and a profiler timeline. On by default in Debug, off in Release.
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.
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.
Which metapackage to reference for a target, and what a working project file looks like.
The fluent surface, so generated code compiles instead of inventing methods.
How to build, publish and check the result on each platform.
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.
| Buttons | ButtonToggleButtonRepeatButtonSplitButtonDropDownButton |
|---|---|
| Text | LabelTextBlockTextBoxMultiLineTextBoxPasswordBoxSyntaxViewer |
| Selection | CheckBoxRadioButtonToggleSwitchComboBoxListBox |
| Data | TreeViewGridView |
| Values | SliderProgressBarProgressRingNumericUpDownColorPickerDatePickerCalendar |
| Containers | TabControlGroupBoxExpanderBorderScrollViewerNavigationView |
| Menus and bars | MenuBarContextMenuToolTipToolBar |
| Media | Image |
| App | WindowDispatcherTimer |
| Panels | GridStackPanelDockPanelUniformGridWrapPanelCanvasSplitPanel |
The core stays thin. Larger features ship as separate packages you reference only when you need them.
Visual Studio style docking: document and tool tabs, drag rearranging, splits, auto hide, popouts.
Pure C# SVG parsing and rendering. No System.Drawing, AOT compatible.
SkiaCanvasView for drawing with SkiaSharp, with zero copy GPU interop per backend.
Cartesian, pie and polar charts on the LiveChartsCore engine, without a SkiaSharp dependency.
Win32 WebView2 control. Requires the Microsoft Edge WebView2 runtime.
Windowing runs through a platform host, drawing through a backend. Pick one backend at publish time to trim the rest away.
| Platform | Host | Backends |
|---|---|---|
| Windows 10+ | Win32 | Direct2D, GDI, MewVG |
| Linux | X11 | MewVG (OpenGL) |
| macOS 12+ | AppKit | MewVG (Metal) |
| Browser | WebAssembly | MewVG (WebGL2) |
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 notesIn English and Korean.