跳到正文
FunCoding

semi-avalonia

Themes and restyles Avalonia applications with Semi.Avalonia, the Semi Design theme for Avalonia's built-in controls. Picks the right style classes and ControlTheme variants, sets up light/dark/high-contrast themes and locales, and overrides resource keys instead of hard-coding values. Use when a project references Semi.Avalonia or Semi.Avalonia.* packages, when XAML contains xmlns semi="https://irihi.tech/semi" or <semi:SemiTheme, or when asked to theme, restyle or re-brand an Avalonia app, switch light/dark mode, or customize Semi colors, radii or spacing.

Star
1,989
许可证
MIT
最近提交
2026年12月1日

.claude/skills/semi-avalonia/SKILL.md

在 GitHub 上查看

Semi.Avalonia

Semi.Avalonia (12.1.0.2) themes the controls Avalonia already has — it adds no controls. One style in App.xaml is the whole setup; everything else is style classes, ControlTheme variants and resource keys.

Workflow

Semi task:
- [ ] 1. Apply: <semi:SemiTheme Locale="..."/> alone in Application.Styles, RequestedThemeVariant set
- [ ] 2. Identify: the control is an Avalonia built-in; the difference wanted is a class, a variant or a token
- [ ] 3. Style: only classes/variants from the control's page (reference/classes.md), never invented ones
- [ ] 4. Customize: override resource keys from reference/tokens.md — never hex literals
- [ ] 5. Review: run checklist.md

Apply. xmlns:semi="https://irihi.tech/semi", <semi:SemiTheme Locale="en-US" /> in Application.Styles. No Fluent or Simple theme next to it. Light/Dark via RequestedThemeVariant; extra palettes SemiTheme.Aquatic/Desert/Dusk/NightSky.

Style. Classes="Primary" and Theme="{DynamicResource SolidButton}". Class names are case-insensitive and combine. The full catalog is in reference/classes.md; per-control detail and demo XAML live at https://irihitech.github.io/Semi.Avalonia/controls/.md.

Customize. Override Semi* resource keys (app-wide in App.xaml, per-subtree in a control's Resources). Keys are string literals, so copy them exactly — a mistyped key fails silently. All keys with values: reference/tokens.md. Patterns and troubleshooting: reference/customization.md.

Core rules

  1. Avalonia built-ins only. There is no semi:Button. Write Button; SemiTheme styles it. New controls belong to Ursa.
  2. Documented names only. A class, variant or key not in the pages is invented and fails silently.
  3. Tokens, not values. No hex colors, no magic numbers; override the key so Light/Dark both follow.
  4. One theme source. SemiTheme alone; never mix Fluent or Simple into the same app.

Satellites

Semi.Avalonia.DataGrid, Semi.Avalonia.TreeDataGrid, Semi.Avalonia.ColorPicker — same pattern, separate packages, main theme required.

相似的 Skill

prototype

MAmattpocock/skills337k近 7 天新增 4,978 个 star

angular-developer

AFaffaan-m/ECC315k近 7 天新增 4,381 个 star

官方

firecrawl-build-scrape

FIfirecrawl/firecrawl215k近 7 天新增 5,595 个 star

官方

brand-guidelines

ANanthropics/skills203k近 7 天新增 3,265 个 star

精选

frontend-design

为界面确定视觉方向和字体,避免模板化的默认样式。

ANanthropics/skills203k近 7 天新增 3,265 个 star

精选

web-artifacts-builder

用 React、Tailwind 和 shadcn/ui 构建多组件页面。

ANanthropics/skills203k近 7 天新增 3,265 个 star