Get started with ShellUI Native in under 5 minutes.
- .NET 10.0 SDK (see global.json)
- A .NET MAUI project (
dotnet new maui); Avalonia support is the next phase (see DEVELOPMENT_PLAN.md)
ShellUI Native is in prerelease, so include --prerelease:
dotnet tool install -g ShellUI.Native.CLI --prereleasecd YourProjectshellui-native init --yesThis will:
- Detect your project type (MAUI, Avalonia, WinUI, or WPF β see ARCHITECTURE.md Β§ Platform Detection)
- Create the
Components/UI/folder - Install the
Shell.csutility - Create
shellui-native.jsonconfiguration - Generate theme resources (MAUI)
Templates exist for MAUI only so far. In an Avalonia, WinUI or WPF project,
initskips theShell.csutility andaddreports that the component has no template for that platform.
# Add a single component
shellui-native add button
# Add multiple components
shellui-native add button input card
# Add with comma separation
shellui-native add button,input,cardPublish the theme tokens before the first page loads, in App.xaml.cs:
public App()
{
InitializeComponent();
Components.UI.ShellTheme.EnsureInitialized();
}Components also do this on first use, but calling it early lets your own
{DynamicResource ShellUI*} references resolve on the first page. See
COMPONENTS.md Β§ Theming for switching and customizing the theme.
<!-- Add namespace to your XAML -->
<ContentPage xmlns:ui="clr-namespace:YourProject.Components.UI"
BackgroundColor="{DynamicResource ShellUIBackground}">
<!-- Use the Button component -->
<ui:Button Text="Click me!"
Size="Lg"
Clicked="OnButtonClicked" />
</ContentPage>| Command | Description |
|---|---|
shellui-native init |
Initialize project |
shellui-native add <name> |
Add component(s) |
shellui-native list |
List all components |
shellui-native list --installed |
List installed components |
shellui-native remove <name> |
Remove component(s) |
shellui-native update --all |
Update all components |
After initialization, your project will have:
YourProject/
βββ Components/
β βββ UI/
β βββ Button.cs # Added components
β βββ Variants/
β β βββ ButtonVariants.cs
β βββ Shell.cs # Utility class
βββ Resources/
β βββ Styles/
β βββ ShellUITheme.xaml # Theme resources (MAUI)
βββ shellui-native.json # Configuration
- Browse all components:
shellui-native list - Read the Architecture guide
- Check the Component documentation