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.

  1. Install the CLI

    ShellUI Native is a prerelease, so include --prerelease:

    bash
    dotnet tool install -g ShellUI.Native.CLI --prerelease
    
  2. Initialise your project

    In the folder with your .csproj:

    bash
    shellui-native init --yes
    

    init detects the platform from the project file, creates Components/UI, installs Shell.cs (the theme, focus ring and overlay helpers every component uses) and writes shellui-native.json. On MAUI it also writes Resources/Styles/ShellUITheme.xaml, the light palette as XAML resources for design-time previews.

  3. 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();
    }
    
  4. Add components
    bash
    shellui-native add button input card
    

    Names 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.

  5. 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>
    

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.

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.