React Flow Node TS
MicrosoftOfficialCreated by Microsoft
- Skill
- Tool integration
- Software development
- MIT
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured approach to building custom nodes for React Flow applications. It includes templates for React components and TypeScript definitions, ensuring consistent implementation of node handles, data structures, and state integration via Zustand. By following the provided patterns, developers can maintain type safety and architectural consistency when building visual workflow editors or node-based interfaces.
What it does
- Provides templates for React Flow node components
- Defines TypeScript interfaces for node data and types
- Integrates Zustand store patterns for node state management
- Outlines the registration process for custom nodes in the React Flow canvas
- Standardizes the implementation of node handles and resizers
When to use it
- When building custom node types for a React Flow canvas
- When creating visual workflow editors or node-based UI components
- When you need to ensure consistent TypeScript typing across multiple node types
- When integrating custom node state with a global Zustand store
Advantages
- Reduces boilerplate when creating new node types
- Ensures consistent TypeScript type definitions
- Promotes a unified pattern for state management and node registration
- Simplifies the integration of interactive elements like handles and resizers
Usage examples
- “Create a new custom node for a video processing workflow.”
- The agent provides the template files with placeholders replaced for a VideoNode component, including the necessary TypeScript interfaces and Zustand store hooks.
- “How do I register a new node type in my React Flow application?”
- The agent outlines the required steps, including adding the type to the central types file, creating the component, and registering it in the canvas nodeTypes configuration.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/microsoft/react-flow-node-ts/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip react-flow-node-ts.zip -d .agents/skills
Documentation by Microsoft
React Flow Node
Create React Flow node components following established patterns with proper TypeScript types and store integration.
Quick Start
Copy templates from assets/ and replace placeholders:
{{NodeName}}→ PascalCase component name (e.g.,VideoNode){{nodeType}}→ kebab-case type identifier (e.g.,video-node){{NodeData}}→ Data interface name (e.g.,VideoNodeData)
Templates
assets/template.tsx - Node component
assets/types.template.ts - TypeScript definitions
Node Component Pattern
export const MyNode = memo(function MyNode({
id,
data,
selected,
width,
height,
}: MyNodeProps) {
const updateNode = useAppStore((state) => state.updateNode);
const canvasMode = useAppStore((state) => state.canvasMode);
return (
<>
<NodeResizer isVisible={selected && canvasMode === 'editing'} />
<div className="node-container">
<Handle type="target" position={Position.Top} />
{/* Node content */}
<Handle type="source" position={Position.Bottom} />
</div>
</>
);
});Type Definition Pattern
export interface MyNodeData extends Record<string, unknown> {
title: string;
description?: string;
}
export type MyNode = Node<MyNodeData, 'my-node'>;Integration Steps
Add type to
src/frontend/src/types/index.tsCreate component in
src/frontend/src/components/nodes/Export from
src/frontend/src/components/nodes/index.tsAdd defaults in
src/frontend/src/store/app-store.tsRegister in canvas
nodeTypesAdd to AddBlockMenu and ConnectMenu
Files
- ATTRIBUTION.mdAdded by AutoGineer973 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md2.0 KiB
- assets/template.tsxScript3.2 KiB
- assets/types.template.tsScript853 B
assets/types.template.ts
import { Node } from '@xyflow/react';
/**
* {{NodeData}} - Data structure for {{NodeName}}
*
* Extends Record<string, unknown> for React Flow compatibility.
*/
export interface {{NodeData}} extends Record<string, unknown> {
/** Display title for the node */
title: string;
/** Optional description */
description?: string;
// Add additional properties specific to this node type
}
/**
* {{NodeName}} type alias for React Flow
*
* Usage:
* ```typescript
* const node: {{NodeName}} = {
* id: 'unique-id',
* type: '{{nodeType}}',
* position: { x: 0, y: 0 },
* data: { title: 'Example' },
* };
* ```
*/
export type {{NodeName}} = Node<{{NodeData}}, '{{nodeType}}'>;
// Remember to add {{NodeName}} to the AppNode union type in types/index.ts:
// export type AppNode = VideoNode | ImageNode | ... | {{NodeName}};
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs Node.js
Security
What our scanner noticed· Low risk
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Microsoft
- Publisher
- Microsoft (Official)
- Source
- microsoft/skills · .github/plugins/azure-sdk-typescript/skills/react-flow-node-ts · commit 0696600
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Microsoft.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download react-flow-node-ts.zip