.NET MAUI on the Web - and Most of Shiny Controls Just Works
“Can I run my MAUI app in a browser?” has usually meant rewriting the UI in Blazor. Allan Ritchie wanted the opposite: the same XAML, layouts and custom controls, running unchanged in a browser tab. His answer is Platform.Maui.Web, a MAUI backend for WebAssembly where each control maps to a real DOM element, with no Blazor or Razor involved. Buttons are <button>, entries are <input>, shapes render as SVG, and GraphicsView uses a 2D canvas.
Putting it to the test
A purpose-built gallery is one thing, so Allan pointed the backend at an app that had no idea it was headed for the web. The Shiny Controls gallery already had a Linux head, so the web head is mostly that project with the GTK pieces swapped out, plus a one-line change in MauiProgram. He published a trimmed Release build and had Playwright walk every page in Chromium. All 68 pages opened without an exception, and the DataGrid, scheduler, docking panels, gauges and Mermaid diagrams all came along.
The explanation is straightforward. Most Shiny Controls are composed from MAUI primitives such as Grid, Border, Label and GraphicsView, so they work wherever those primitives do. The ones that wrap a native view are the ones still missing.
Where it stands
- Not there yet:
MediaElement, SkiaSharp views, and the controls built onRecyclerView-style native collections.CollectionViewisn’t virtualized either, so very large lists will struggle. - Lessons from trimming: prefer
IQueryAttributableover[QueryProperty], remember thatOnPlatformnow matchesWeb, and note that images and raw assets share one root in the browser. - Try it: it needs the .NET 10 SDK and no workload. Version 0.4.0 of both Platform.Maui.Web packages is on NuGet.
It’s experimental, and Allan is asking for bug reports on the shinyorg/mauiplatforms repository. If you’ve wondered what a browser target for MAUI could look like, this is a candid and practical first look.