Verified pixel by pixel
Each variant, size and state is compared with reference renders in light and dark, over 6,300 cases on every change.
A theme for Avalonia's own controls in the Nova style of shadcn/ui, plus the controls and features Avalonia lacks: 92 components in light, dark and GPUI Kit's 36 color themes, with every variant, size and state checked pixel by pixel and the motion frame by frame.
<uikit:UIKitTheme /><Window xmlns="https://github.com/avaloniaui"
xmlns:uikit="using:AvaloniaUIKit"
Title="Hello, World!">
<uikit:Form Width="360">
<uikit:FormField Label="Name">
<TextBox PlaceholderText="Enter your name" />
</uikit:FormField>
<uikit:FormField Label="Plan">
<ComboBox SelectedIndex="0">
<ComboBoxItem Content="Free" />
<ComboBoxItem Content="Pro" />
</ComboBox>
</uikit:FormField>
<uikit:Form.Footer>
<Button Classes="primary" Content="Let's Go!"
Click="OnGo" />
</uikit:Form.Footer>
</uikit:Form>
</Window>Capabilities
A look is only finished when it holds in every state, so each one is rendered, compared and kept in both themes.
Each variant, size and state is compared with reference renders in light and dark, over 6,300 cases on every change.
Springs drive the transitions, and the animation is compared with the reference frame by frame instead of by eye.
For 48 of the components, UIKitTheme replaces the Avalonia control's ControlTheme: colors, padding, outlines, inner layout, states and animations.
43 new controls in the uikit: namespace, from Badge and Stepper to a Select with search and a virtualized Tree, plus attached properties that add what Avalonia's controls lack, such as a loading Button.
TableView in the main package, and Avalonia's DataGrid with sorting and column resizing from an optional one.
Default Light, Default Dark and the 36 themes GPUI Kit bundles, Aurora's gradients included. Switch with RequestedThemeVariant, for the app or any part of it.
The icons the components draw ship as compiled geometry for PathIcon, in four sizes that match the controls.
Compiled bindings only and no reflection. A NativeAOT smoke test renders every control in both themes on each change.
The same controls run in the browser on Avalonia's WebAssembly backend. Every demo on this site is live.
Four packages. One theme.
UIKitTheme covers Avalonia's built-in controls and the new ones. Avalonia ships ColorPicker and DataGrid as packages of their own, and so does this library; the theme for Dock.Avalonia is separate too, so an app takes no dependency it does not use.
UIKitTheme for Avalonia's own controls, the uikit: controls and attached properties, the color tokens and the icons.
<Application.Styles>
<uikit:UIKitTheme />
</Application.Styles>UIKitColorPickerTheme gives the ColorPicker package a swatch or a field with a palette popover. The main package's uikit:ColorSelect needs neither.
<Application.Styles>
<uikit:UIKitTheme />
<uikitcolor:UIKitColorPickerTheme />
</Application.Styles>UIKitDataGridTheme gives DataGrid the data table look of TableView, with the grid's own features.
<Application.Styles>
<uikit:UIKitTheme />
<uikitgrid:UIKitDataGridTheme />
</Application.Styles>UIKitDockTheme gives Dock.Avalonia's dock control the tab bars, title bars, split handles and drop targets of a dock.
<Application.Styles>
<uikit:UIKitTheme />
<uikitdock:UIKitDockTheme />
</Application.Styles>Principle
Behavior belongs to Avalonia.
Looks and motion belong to the theme.
UIKitTheme replaces each control's ControlTheme and leaves the control itself alone: its behavior, input handling, accessibility and API stay exactly as Avalonia ships them. What the controls lack is added only where the app asks for it: an attached property it sets, or a uikit: control it places.
Explore the components