AGENT SKILL

reactor-dsl

Pointer to the full Reactor API signatures index (`references/reactor.api.txt`). The 90% of DSL content — hooks, components, common factories, modifiers, theme tokens, gotchas, React-to-Reactor mapping — already lives in `reactor-getting-started`. Load this skill only when you need to verify a less-common signature against the alphabetized full index.

使用场景后端与接口
License 许可
MIT
最近更新
2026-11-15
Stars
★ 896
Forks
67

01 前言 Front Matter

name
reactor-dsl
description
Pointer to the full Reactor API signatures index (`references/reactor.api.txt`). The 90% of DSL content — hooks, components, common factories, modifiers, theme tokens, gotchas, React-to-Reactor mapping — already lives in `reactor-getting-started`. Load this skill only when you need to verify a less-common signature against the alphabetized full index.

02 资源文件 114

03 SKILL.md 正文

What this skill carries

The full alphabetized signatures index lives at:

references/reactor.api.txt    (~70K tokens, ~6.3K lines)

It covers every public factory, modifier, hook, theme token and enum, plus a ## Public types section carrying the constructors, properties, methods and events of every other public type — including public static classes, so process-wide entry points such as ControlRegistry.Register and ReactorApp.Run are listed there too.

It is large: grep it for the symbol you need rather than reading it end to end.

It is the source of truth for the public API surface, regenerated from Reactor.dll by mur --regen-api.

In addition, the skill carries focused topical references for surfaces big enough to need their own page:

Topic File When to load
Keyed list reconciliation references/keyed-lists.md Choosing between IReactorKeyed, an explicit keySelector, and the three .WithKey(...) overloads; debugging a list that re-mounts on insert; understanding the bulk-replace bailout or the duplicate-key diagnostic. (Spec 042.)
Element refs and reference props references/element-refs.md Wiring UseElementRef<T>(), .Ref(...), .Target(...), accessibility relationships, XYFocus*, or custom descriptor .Reference / .ReferenceList entries. (Spec 057.)

When to load this skill

You probably don't need to. The reactor-getting-started skill carries the hooks table, the most-used factory signatures, the React-to-Reactor mapping, modifiers, theme tokens, and the critical gotchas — that's the 90% case.

Load this skill only when:

  • You've checked reactor-getting-started and the factory/modifier you need isn't listed.
  • You see a REACTOR_* analyzer ID and want to confirm the exact API surface in question.
  • You're using a less-common control (DataGrid column overrides, AnnotatedScrollBar, AcrylicBrush parameters, etc.).

How to use the api index

Read the file once, scan for what you need, then keep working from memory. Do not re-page through it — the file is large and re-reading injects ~12K tokens per call. Per-pattern lookups are far cheaper than full re-reads.

If you only need to confirm whether a single name exists, use a grep for the symbol against the file rather than viewing it whole.

Fluent naming convention (callbacks)

Callback properties are named OnX on the record (e.g. OnClick, OnChanged, OnSelectedTagChanged). The matching fluent extension drops the leading On and is named after the event:

// Record property is OnClick — the fluent is .Click(...)
Button("Save").Click(() => Save());

// Record property is OnSelectedTagChanged — the fluent is .SelectedTagChanged(...)
NavigationView(...).SelectedTagChanged(tag => Navigate(tag));

This is intentional — C# doesn't allow an extension method to share a name with an instance property, so the On prefix lives on the property and the event-style name lives on the fluent. The two surfaces are equivalent; prefer the fluent for new code. Passing null to any OnX fluent clears the handler.

Common naming gotchas

  • FlexElement record properties (set via with { ... }): Direction, JustifyContent, AlignItems, AlignContent, Wrap, ColumnGap, RowGap ⚠️ It's JustifyContent — NOT Justify. Example: FlexRow(a, b, c) with { JustifyContent = FlexJustify.SpaceBetween, ColumnGap = 8 }

04 同仓库更多 Skills

microsoft
microsoft/microsoft-ui-reactor

Charting

暂无简介

★ 896
microsoft
microsoft/microsoft-ui-reactor

reactor-wrapping

Turn ANY WinUI control — a vendor/third-party control, your own custom Control, or a Windows Community Toolkit one — into a first-class declarative Reactor element with the [GenerateReactorWrapper] source generator, zero hand-written wrapper code. Covers auto-inference (props, content, two-way pairs, panel/items children, events), the [Wrap*] annotation cheat-sheet, imperative-lifecycle controls, diagnostics, and when to fall back to a hand-written ControlDescriptor.

★ 896
microsoft
microsoft/microsoft-ui-reactor

reactor-windowing

Reactor top-level windowing cookbook: WindowSpec, OpenWindow, draggable windows, borderless/tool windows, placement persistence, taskbar visibility, z-order, aspect ratio, SizeToContent, displays, taskbar integration, and owner-window file/folder pickers.

★ 896
microsoft
microsoft/microsoft-ui-reactor

reactor-recipes

Paste-ready single-file Reactor recipes indexed by intent — list with add/delete/toggle, sidebar navigation between pages, form with validation + submit gating, async fetch with loading/error/data states, themed Win11 card surface. Use a recipe instead of synthesizing from prose: copy, adjust, ship.

★ 896
microsoft
microsoft/microsoft-ui-reactor

reactor-navigation

Reactor navigation — `UseNavigation` hook, `NavigationHost` renderer, `NavigationView` sidebar, `TabView` tabs, route params, stack operations, page lifecycle, deep linking, transitions, caching. Use when building multi-page apps or wiring sidebar/tab navigation.

★ 896
microsoft
microsoft/microsoft-ui-reactor

reactor-input

Reactor input — gestures (`OnPan`, `OnPinch`, `OnRotate`), pointer events, drag-and-drop (`OnDragStarting`), focus management (`UseElementFocus`, `UseFocus`, `UseFocusTrap`). Use when implementing direct manipulation or custom focus behavior.

★ 896