# Semi.Avalonia > Semi.Avalonia is an Avalonia 12.1.0 THEME library: it themes the controls Avalonia already has (Button, TextBox, DataGrid, …) in the style of Semi Design, with light, dark and four high-contrast palettes, 16 built-in locales, and every color, radius and spacing behind a resource key. It adds no controls of its own — for new controls see Ursa. MIT licensed. Version 12.1.0.2 (pin the exact version on nuget.org). This site's demo is an Avalonia WebAssembly app that draws to a canvas, so its HTML carries no text: read these Markdown files instead. ## Install ```bash dotnet add package Semi.Avalonia ``` ```xml ``` That single style is the whole setup. Do not add Avalonia's Fluent or Simple theme alongside it. `RequestedThemeVariant` switches Light/Dark (Default follows the system); the extra palettes are `SemiTheme.Aquatic`, `SemiTheme.Desert`, `SemiTheme.Dusk` and `SemiTheme.NightSky`. ## Rules for agents - This is Avalonia, not WPF, WinUI or HTML: no `Visibility`, no CSS. And this is a THEME library: the controls are Avalonia's own. There is no `semi:Button`; write `Button` and let SemiTheme style it. - The Semi namespace `https://irihi.tech/semi` is only for ``. - Appearance differences are style classes and ControlTheme variants, and ONLY the ones listed in a control's page: `Classes="Primary Danger"`, `Theme="{DynamicResource SolidButton}"`. A class or variant that is not in the page is invented. - Colors, radii, spacing and fonts come from resource keys: `Background="{DynamicResource SemiColorPrimary}"`. Never hard-code hex values; override the key instead. - Override only the keys a control's page lists — they exist in the Light and Dark themes (the high-contrast presets override a subset). A new global key must be defined in `Variables.axaml` or in both palette files. - Localization of built-in control text is `Locale="zh-CN"` on SemiTheme (16 locales); your own strings are your business. - DataGrid, TreeDataGrid and ColorPicker themes are separate packages: Semi.Avalonia.DataGrid, Semi.Avalonia.TreeDataGrid, Semi.Avalonia.ColorPicker. ## Pages - [tokens.md](https://irihitech.github.io/Semi.Avalonia/tokens.md): all 56 design tokens, 270 semantic color tokens and 177 raw palette colors, with values and Light/Dark pairs. - [customization.md](https://irihitech.github.io/Semi.Avalonia/customization.md): theme switching, high-contrast palettes (Aquatic, Desert, Dusk, NightSky), locale, and every customization pattern. - [llms-full.txt](https://irihitech.github.io/Semi.Avalonia/llms-full.txt): every page above in one file. - [ai/semi-avalonia.contract.json](https://irihitech.github.io/Semi.Avalonia/ai/semi-avalonia.contract.json): the same facts as a deterministic, versioned JSON contract, hashed by [ai/provenance.json](https://irihitech.github.io/Semi.Avalonia/ai/provenance.json). Machine-readable, for marketplaces and MCP servers to import — humans should read the pages above. ## Agent skill - [SKILL.md](https://irihitech.github.io/Semi.Avalonia/skills/semi-avalonia/SKILL.md), [checklist.md](https://irihitech.github.io/Semi.Avalonia/skills/semi-avalonia/checklist.md) and the reference files next to them. Save the whole `https://irihitech.github.io/Semi.Avalonia/skills/semi-avalonia` folder into your agent's skills directory (for Claude Code: `.claude/skills/semi-avalonia/`): ```bash mkdir -p .claude/skills/semi-avalonia/reference for f in SKILL.md checklist.md reference/tokens.md reference/customization.md reference/classes.md; do curl -fsSL "https://irihitech.github.io/Semi.Avalonia/skills/semi-avalonia/$f" -o ".claude/skills/semi-avalonia/$f" done ``` ## Optional - [Source code](https://github.com/irihitech/Semi.Avalonia): the repository; its `AGENTS.md` is for work on the theme itself. - [NuGet](https://www.nuget.org/packages/Semi.Avalonia): the package. - [IRIHI eureka-skills](https://github.com/irihitech/eureka-skills): skill plugins that redistribute this generated `semi-avalonia` skill offline and add the usage-oriented `semi-avalonia-usage` skill (which control to pick, scenarios, MVVM) for Semi/Ursa and related Avalonia tooling; [Irihi.Eureka.McpServer](https://www.nuget.org/packages/Irihi.Eureka.McpServer) serves the control property tables and this contract's resources over MCP (beta). ## Themed controls Each page shows the style classes, ControlTheme variants, pseudo-classes, overridable resource keys and the full source of the demo. Controls without a demo are listed in the skill's reference/classes.md. - [AutoCompleteBox](https://irihitech.github.io/Semi.Avalonia/controls/AutoCompleteBox.md): classes Bordered, Large, Small; 3 override keys. - [Border](https://irihitech.github.io/Semi.Avalonia/controls/Border.md): classes Hover, Shadow; themes CardBorder; 3 override keys. - [Button](https://irihitech.github.io/Semi.Avalonia/controls/Button.md): classes Colorful, Danger, Large, Primary, Secondary, Small, Success, Tertiary, Warning; themes BorderlessButton, OutlineButton, SolidButton; 77 override keys. - [ButtonSpinner](https://irihitech.github.io/Semi.Avalonia/controls/ButtonSpinner.md): themes ButtonSpinnerRepeatButton, SplitButtonSpinner; 7 override keys. - [Calendar](https://irihitech.github.io/Semi.Avalonia/controls/Calendar.md): 27 override keys. - [CalendarDatePicker](https://irihitech.github.io/Semi.Avalonia/controls/CalendarDatePicker.md): classes Bordered, clearButton, Large, Small; 15 override keys. - [Carousel](https://irihitech.github.io/Semi.Avalonia/controls/Carousel.md): classes Center, Columnar, Left, Line, Right; themes CarouselButton, CarouselIndicatorColumnarListBoxItem, CarouselIndicatorDotListBoxItem, CarouselIndicatorLineListBoxItem, FullCarousel; 6 override keys. - [CarouselPage](https://irihitech.github.io/Semi.Avalonia/controls/CarouselPage.md): shared resources. - [CheckBox](https://irihitech.github.io/Semi.Avalonia/controls/CheckBox.md): themes CardCheckBox, PureCardCheckBox, SimpleCheckBox; 26 override keys. - [ComboBox](https://irihitech.github.io/Semi.Avalonia/controls/ComboBox.md): classes Bordered, clearButton, Large, Small; 41 override keys. - [CommandBar](https://irihitech.github.io/Semi.Avalonia/controls/CommandBar.md): themes CommandBarButtonBaseTheme; 17 override keys. - [ContentPage](https://irihitech.github.io/Semi.Avalonia/controls/ContentPage.md): 2 override keys. - [DataValidationErrors](https://irihitech.github.io/Semi.Avalonia/controls/DataValidationErrors.md): themes SilentDataValidationErrors, TooltipDataValidationErrors; 11 override keys. - [DatePicker](https://irihitech.github.io/Semi.Avalonia/controls/DatePicker.md): classes clearButton, Large, Small. - [DrawerPage](https://irihitech.github.io/Semi.Avalonia/controls/DrawerPage.md): themes DrawerPageToggleButton; 4 override keys. - [Expander](https://irihitech.github.io/Semi.Avalonia/controls/Expander.md): themes CardExpander, CardSplitExpander, ExpanderHeaderToggleButtonTheme, SplitExpander; 8 override keys. - [GridSplitter](https://irihitech.github.io/Semi.Avalonia/controls/GridSplitter.md): 2 override keys. - [HeaderedContentControl](https://irihitech.github.io/Semi.Avalonia/controls/HeaderedContentControl.md): themes GroupBox; 2 override keys. - [HyperlinkButton](https://irihitech.github.io/Semi.Avalonia/controls/HyperlinkButton.md): classes OnlyIcon, Underline, WithIcon; 5 override keys. - [Label](https://irihitech.github.io/Semi.Avalonia/controls/Label.md): classes Amber, Blue, Circle, Code, Colorful, Cyan, Danger, Ghost, Gradient, Green, Grey, H1, H2, H3, H4, H5, H6, Indigo, Large, LightBlue, LightGreen, Lime, Mark, Orange, Pink, Purple, Quaternary, Red, Secondary, Solid, Success, Teal, Tertiary, Violet, Warning, White, Yellow; themes TagLabel, TitleLabel; 98 override keys. - [ListBox](https://irihitech.github.io/Semi.Avalonia/controls/ListBox.md): classes Large, Small; themes ButtonRadioGroupListBox, ButtonRadioGroupListBoxItem, CardCheckGroupListBox, CardCheckGroupListBoxItem, CardRadioGroupListBox, CardRadioGroupListBoxItem, CheckGroupListBox, CheckGroupListBoxItem, PureCardRadioGroupListBox, PureCardRadioGroupListBoxItem, RadioGroupListBox, RadioGroupListBoxItem; 11 override keys. - [ManagedFileChooser](https://irihitech.github.io/Semi.Avalonia/controls/ManagedFileChooser.md): 2 override keys. - [Menu](https://irihitech.github.io/Semi.Avalonia/controls/Menu.md): themes MenuScrollViewer, TopLevelMenuItem; 17 override keys. - [NavigationPage](https://irihitech.github.io/Semi.Avalonia/controls/NavigationPage.md): classes Large; 2 override keys. - [NumericUpDown](https://irihitech.github.io/Semi.Avalonia/controls/NumericUpDown.md): classes Large, Small, Split. - [PathIcon](https://irihitech.github.io/Semi.Avalonia/controls/PathIcon.md): classes Active, ExtraLarge, ExtraSmall, Large, Small; themes InnerPathIcon. - [PipsPager](https://irihitech.github.io/Semi.Avalonia/controls/PipsPager.md): themes PipsPagerButton, PipsPagerIndicatorDotListBoxItem; 6 override keys. - [ProgressBar](https://irihitech.github.io/Semi.Avalonia/controls/ProgressBar.md): classes Danger, Left, Primary, Right, Secondary, Success, Tertiary, Warning; themes ProgressRing; 10 override keys. - [RadioButton](https://irihitech.github.io/Semi.Avalonia/controls/RadioButton.md): classes Large, Small; themes ButtonRadioButton, CardRadioButton, PureCardRadioButton, RadioButtonGroupBorder; 36 override keys. - [RefreshContainer](https://irihitech.github.io/Semi.Avalonia/controls/RefreshContainer.md): 2 override keys. - [ScrollViewer](https://irihitech.github.io/Semi.Avalonia/controls/ScrollViewer.md): classes InsetContent; themes ScrollBarRepeatButton, StaticScrollViewer; 5 override keys. - [Slider](https://irihitech.github.io/Semi.Avalonia/controls/Slider.md): classes ToolTip; themes SliderHorizontalRepeatButton, SliderThumbTheme, SliderVerticalRepeatButton; 10 override keys. - [SplitView](https://irihitech.github.io/Semi.Avalonia/controls/SplitView.md): 3 override keys. - [TabbedPage](https://irihitech.github.io/Semi.Avalonia/controls/TabbedPage.md): themes ButtonTabbedPage, CardTabbedPage. - [TabControl](https://irihitech.github.io/Semi.Avalonia/controls/TabControl.md): classes ReverseSeparator; themes BaseScrollTabControl, BaseTabControl, ButtonTabControl, CardTabControl, LineTabControl, ScrollButtonTabControl, ScrollCardTabControl, ScrollLineTabControl, ScrollTabControl; 1 override key. - [TableView](https://irihitech.github.io/Semi.Avalonia/controls/TableView.md): themes TableViewScrollViewerTheme; 18 override keys. - [TabStrip](https://irihitech.github.io/Semi.Avalonia/controls/TabStrip.md): themes BaseTabStripItem, ButtonTabStrip, ButtonTabStripItem, CardTabStrip, CardTabStripItem, LineTabStrip, LineTabStripItem. - [TextBlock](https://irihitech.github.io/Semi.Avalonia/controls/TextBlock.md): classes Danger, Delete, H1, H2, H3, H4, H5, H6, Mark, Quaternary, Secondary, Success, Tertiary, Underline, Warning; themes TitleTextBlock; 14 override keys. - [TextBox](https://irihitech.github.io/Semi.Avalonia/controls/TextBox.md): classes Bordered, clearButton, Large, revealPasswordButton, Small, TextArea; themes LooklessTextBox, NonErrorTextBox; 19 override keys. - [TimePicker](https://irihitech.github.io/Semi.Avalonia/controls/TimePicker.md): classes clearButton, Large, Small. - [ToggleSwitch](https://irihitech.github.io/Semi.Avalonia/controls/ToggleSwitch.md): classes Accent, Large, Loading, Small; themes SimpleToggleSwitch; 19 override keys. - [Tooltip](https://irihitech.github.io/Semi.Avalonia/controls/Tooltip.md): 3 override keys. - [TreeView](https://irihitech.github.io/Semi.Avalonia/controls/TreeView.md): themes ToggleButtonTreeViewItemIconButton; 12 override keys. ## Catalog only (no demo page) - AdornerLayer: classes Solid; themes AdornerLayerBorder; 2 override keys. - ContextMenu: shared resources. - DateTimePickerShared: themes DateTimePickerButton, DateTimePickerDownButton, DateTimePickerFlyoutButton, DateTimePickerItem, DateTimePickerUpButton; 21 override keys. - DropDownButton: classes Colorful, Danger, Large, Primary, Secondary, Small, Success, Tertiary, Warning; themes BorderlessDropDownButton, OutlineDropDownButton, SolidDropDownButton. - EmbeddableControlRoot: shared resources. - FlyoutPresenter: themes LightFlyout. - GlyphButton: classes Large, Small; themes GlyphButton, GlyphToggleSwitch, SquareButton, SquareToggleSwitch; 5 override keys. - GroupBox: shared resources. - ItemsControl: shared resources. - MenuFlyoutPresenter: themes HorizontalMenuFlyoutPresenter. - NotificationCard: classes Light; 18 override keys. - Popup: shared resources. - RepeatButton: shared resources. - SelectableTextBlock: classes Danger, Delete, H1, H2, H3, H4, H5, H6, Mark, Quaternary, Secondary, Success, Tertiary, Underline, Warning; themes TitleSelectableTextBlock. - SplitButton: classes Danger, Large, Primary, Secondary, Small, Success, Tertiary, Warning; themes BorderlessSplitButton, OutlineSplitButton, SemiSplitButtonElement, SolidSplitButton. - TabItem: themes BaseTabItem, ButtonTabItem, CardTabItem, LineTabItem; 19 override keys. - ThemeVariantScope: shared resources. - ToggleButton: classes Colorful, Danger, Primary, Secondary, Success, Tertiary, Warning; 3 override keys. - TransitioningContentControl: shared resources. - Window: 3 override keys. - WindowDrawnDecorations: themes CaptionButton; 11 override keys. - WindowNotificationManager: shared resources. - _index: shared resources.