reactor-input

Handle pointer, gesture, and focus events in Reactor WinUI components.

609|44|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/microsoft/microsoft-ui-reactor --skill reactor-input
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: reactor-input
Source: https://github.com/microsoft/microsoft-ui-reactor/tree/main/plugins/reactor/skills/reactor-input
Command: npx skills add https://github.com/microsoft/microsoft-ui-reactor --skill reactor-input

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reactor developers need a cohesive, declarative way to handle user input and gestures, including pointer events, taps, drags, and focus management, without relying on ad-hoc wiring scattered across components.

Core Features & Use Cases

  • Centralized gesture surface: OnPointerEntered/Exited/Pressed/Released/Moved, OnTapped/OnDoubleTapped/OnRightTapped, OnPan, OnPinch, OnRotate, OnLongPress.
  • Focus management and typed refs: UseElementFocus, UseElementRef<T>, XYFocus, AccessKey, and tab/navigation controls for accessible UI.
  • Drag-and-drop support: both typed payloads (for end-to-end flows) and untyped drops, with inertial handling for smooth interactions.
  • Use cases span custom manipulation controls, MVU-like patterns, and interactive widgets in Reactor-based WinUI apps.

Quick Start

Start by wiring a simple element to respond to pan and tap events to move a UI element on screen.

Frequently Asked Questions about reactor-input

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle gestures and pointer events declaratively in WinUI apps?

Declarative gesture and pointer event handling in WinUI apps is achieved by mapping callbacks like OnPointerPressed and OnPan directly to component properties. This provides a stable API surface for taps, pans, and pinches without ad-hoc wiring.

What is the best way to manage focus and element refs in a Reactor component?

Focus and element refs in a Reactor component are managed using declarative hooks like UseElementFocus and UseElementRef<T>. These tools provide safe defaults for XYFocus, tab navigation, and accessible UI control.

How do I implement drag-and-drop with typed payloads in Reactor?

Drag-and-drop with typed payloads in Reactor is implemented using the centralized gesture surface to handle both typed and untyped drops. This supports end-to-end flows and includes inertial handling for smooth interactions.

Does Reactor input support custom manipulation controls like pinch and rotate?

Reactor input supports custom manipulation controls by providing dedicated handlers for pinch and rotate gestures. Developers can wire OnPinch and OnRotate callbacks to build interactive widgets and custom manipulation interfaces.

Can I use this declarative input handling for MVU-like patterns in WinUI?

Declarative input handling is fully applicable to MVU-like patterns in WinUI. It centralizes user input, gesture recognition, and focus management into a cohesive surface that integrates cleanly with model-view-update architectures.