react-flow-node-ts

Featured

Create React Flow node components with TypeScript types, handles, and Zustand integration. Use when building custom nodes for React Flow canvas, creating visual workflow editors, or implementing node-based UI components.

Web & Frontend 3,222 stars 372 forks Updated today MIT

Install

View on GitHub

Quality Score: 94/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
84
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# React Flow Node Create React Flow node components following established patterns with proper TypeScript types and store integration. ## Quick Start Copy templates from [assets/](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](assets/template.tsx) - Node component - [assets/types.template.ts](assets/types.template.ts) - TypeScript definitions ## Node Component Pattern ```tsx 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 ```typescript export interface MyNodeData extends Record<string, unknown> { title: string; description?: string; } export type MyNode = Node<MyNodeData, 'my-node'>; ``` ## Integration Steps 1. Add type to `src/frontend/src/types/index.ts` 2. Create component in `src/frontend/src/components/nodes/` 3. Export from ...

Details

Author
microsoft
Repository
microsoft/skills
Created
10 months ago
Last Updated
today
Language
TypeScript
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category