Installation
Install the CLI, initialise a MAUI or Avalonia project, and add your first component.
You need the .NET 10 SDK and a .NET MAUI or Avalonia 12 project. The same commands work in both: init detects which one it is, and add installs that platform's version of each component.
- Install the CLI
ShellUI Native is a prerelease, so include
--prerelease:bashdotnet tool install -g ShellUI.Native.CLI --prerelease - Initialise your project
In the folder with your
.csproj:bashshellui-native init --yesinitdetects the platform from the project file, createsComponents/UI, installsShell.cs(the theme, focus ring and overlay helpers every component uses) and writesshellui-native.json. On MAUI it also writesResources/Styles/ShellUITheme.xaml, the light palette as XAML resources for design-time previews. - Load the theme
Publish the theme tokens before the first page appears, so your own
{DynamicResource ShellUI*}references resolve straight away (components also do it on first use):csharp// App.xaml.cs public App() { InitializeComponent(); Components.UI.ShellTheme.EnsureInitialized(); }csharp// App.axaml.cs public override void Initialize() { AvaloniaXamlLoader.Load(this); Components.UI.ShellTheme.EnsureInitialized(); } - Add componentsbash
shellui-native add button input cardNames can be separated by spaces or commas. Adding a part (
dialog-trigger) installs its whole family, and every component brings the helpers it depends on. - Use them in XAML
Import the namespace and use the components with the
ui:prefix:xml<ContentPage xmlns:ui="clr-namespace:MyApp.Components.UI" BackgroundColor="{DynamicResource ShellUIBackground}"> <ui:Button Text="Click me" Size="Lg" Clicked="OnClicked" /> </ContentPage>xml<Window xmlns:ui="using:MyApp.Components.UI" Background="{DynamicResource ShellUIBackgroundBrush}"> <ui:Button Text="Click me" Size="Lg" Clicked="OnClicked" /> </Window>
What you get
MyApp/
├── Components/
│ └── UI/
│ ├── Shell.cs # theme, focus ring, overlays
│ ├── Button.cs
│ └── Variants/
│ └── ButtonVariants.cs
├── Resources/Styles/ShellUITheme.xaml # MAUI only
└── shellui-native.json
Every file is plain C#. Commit them with your app and change them like any other code.
Platform notes
- MAUI: tested on Windows and Android. iOS and Mac Catalyst build but haven't been run on a device yet.
- Avalonia: tested on Windows; the demo builds on Linux and macOS in CI. Components use Avalonia 12 and the Fluent theme.
- Long pages on Windows (MAUI): a single page with hundreds of controls can hit WinUI's layout-pass limit. Split it into sections that load when shown.