MCPInstall

syncfusion-react-diagram

Create and customize visual diagrams in React using Syncfusion Diagrams. Trigger for requests involving React component setup, nodes and connectors, flowcharts, org charts, process diagrams, BPMN or UML models, ER diagrams, layout algorithms, swimlanes, symbol palettes, and interactive diagram visualization features.

Installs
720
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/syncfusion/react-ui-components-skills --skill syncfusion-react-diagram
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads syncfusion-react-diagram automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Syncfusion React Diagram

The Syncfusion React Diagram component enables building rich, interactive diagrams including flowcharts, organizational charts, BPMN process flows, UML diagrams, mind maps, and network diagrams. It renders using SVG and supports extensive customization through nodes, connectors, ports, annotations, layouts, and data binding.

Table of Contents

When to Use This Skill

Use this skill when users need to:

  • Build flowcharts representing processes, decision trees, or workflows
  • Create org charts from hierarchical or flat data sources
  • Model BPMN diagrams with activities, events, gateways, and flows
  • Draw UML diagrams including class diagrams and sequence diagrams
  • Visualize mind maps or radial layouts from data
  • Design network/entity diagrams with nodes and relationship connectors
  • Implement swimlane diagrams with lanes and phases
  • Drag and drop shapes from a symbol palette onto a canvas
  • Bind data to automatically generate diagram structure
  • Serialize and restore diagram state as JSON
  • Export or print diagram content as image/SVG

Important: API Verification Required

API Verification Required: Always verify API class names, properties, and signatures by reading reference files (references/*.md) BEFORE generating code examples. Do not assume or infer class names.

Component Overview

The Diagram component is built around:

  • Nodes — Graphical shapes (rectangles, circles, flow shapes, custom) placed on the canvas
  • Connectors — Lines/arrows linking nodes or freestanding points
  • Annotations — Text labels attached to nodes or connectors
  • Ports — Named connection points on nodes for precise connector anchoring
  • Layouts — Automatic arrangement algorithms (hierarchical, org-chart, mindmap, radial, flowchart)
  • Symbol Palette — Sidebar of draggable shape symbols
  • Module System — Opt-in feature modules (Inject directive) to keep bundle size lean

All diagram elements are rendered using SVG for crisp, resolution-independent graphics.

Documentation and Navigation Guide

Getting Started

📄 Read: references/getting-started.md

When to read:

  • First-time setup of the Diagram component
  • Installing packages, CSS imports, and theme configuration
  • Creating a minimal DiagramComponent
  • Understanding the Inject module system
  • Next.js or Preact integration

Covers:

  • npm install and dependencies
  • Vite/CRA project setup
  • CSS theme import paths
  • Basic DiagramComponent with nodes and connectors
  • Module injection with <Inject services={[...]} />
  • Next.js and Preact usage notes

Nodes

📄 Read: references/nodes.md

When to read:

  • Adding, positioning, and sizing nodes
  • Customizing node appearance (fill, stroke, shadow)
  • Working with node shapes (Flow, Basic, Path, Image, HTML)
  • Handling node events (click, drag, resize)
  • Expanding/collapsing nodes at runtime
  • Setting default node properties via getNodeDefaults

Covers:

  • Creating nodes via nodes collection
  • offsetX/offsetY, width/height positioning
  • Adding/removing nodes at runtime (diagram.add, diagram.remove)
  • Style properties (fill, strokeColor, opacity, gradient)
  • getNodeDefaults pattern for consistent styling
  • Node expand/collapse with expandIcon/collapseIcon
  • Node interaction events

Connectors

📄 Read: references/connectors.md

When to read:

  • Drawing lines/arrows between nodes or freestanding points
  • Choosing connector type (Straight, Orthogonal, Bezier)
  • Configuring connector segments and routing
  • Customizing decorator (arrow) shapes
  • Setting sourceID/targetID to link nodes
  • Setting getConnectorDefaults for consistent styling

Covers:

  • Connector types: Straight, Orthogonal, Bezier
  • sourcePoint/targetPoint for freestanding connectors
  • sourceID/targetID for node-to-node connections
  • Multiple segment configuration
  • Bezier control points and segment edit orientation
  • Arrow/decorator customization
  • Connector events and interaction
  • getConnectorDefaults pattern

Labels and Annotations

📄 Read: references/labels-and-annotations.md

When to read:

  • Adding text labels to nodes or connectors
  • Styling annotation text (font, color, bold, alignment)
  • Making labels draggable or editable
  • Positioning labels relative to nodes/connectors
  • Handling label-specific events

Covers:

  • annotations array on nodes and connectors
  • Label content, style, offset, alignment
  • Node labels vs. connector labels
  • Label interaction (edit on double-click, drag)
  • Label appearance (background, border, padding)
  • Label events

Ports

📄 Read: references/ports.md

When to read:

  • Creating named connection points on nodes
  • Controlling where connectors attach to a node
  • Styling and positioning ports
  • Restricting connector connections to specific ports
  • Handling port interaction events

Covers:

  • Port types and ports array on nodes
  • Port positioning (offset, alignment)
  • Port appearance (shape, fill, stroke)
  • Connecting connectors to specific ports via sourcePortID/targetPortID
  • Port interaction and visibility options
  • Port events

Shapes and Styles

📄 Read: references/shapes-and-styles.md

When to read:

  • Choosing the right shape type (Flow, Basic, Path, Image, HTML, Native SVG)
  • Applying fill colors, gradients, and stroke styles
  • Customizing node appearance with CSS or themes
  • Understanding shape property structure

Covers:

  • shape.type options: Flow, Basic, Path, Image, HTML, Native
  • Flowchart shape values (Terminator, Process, Decision, etc.)
  • Basic shape values (Rectangle, Ellipse, Diamond, etc.)
  • Style properties: fill, strokeColor, strokeWidth, strokeDashArray, opacity
  • Linear and radial gradients
  • Shadow effect
  • CSS class-based styling

BPMN Diagrams

📄 Read: references/bpmn-diagrams.md

When to read:

  • Modeling business process flows using BPMN notation
  • Using BPMN-specific shapes (activities, events, gateways)
  • Drawing sequence flows, message flows, associations
  • Adding data objects, data sources, text annotations, and groups

Covers:

  • BpmnDiagrams module injection
  • BPMN shape type: shape.type = 'Bpmn'
  • Activities: Task types, Subprocess, Expanded Subprocess
  • Events: Start, End, Intermediate events and their triggers
  • Gateways: Exclusive, Parallel, Inclusive, Complex
  • Flows: Sequence, Message, Association
  • Data objects and data sources
  • BPMN groups and text annotations

UML Diagrams

📄 Read: references/uml-diagrams.md

When to read:

  • Building UML class diagrams with attributes and methods
  • Modeling relationships (association, generalization, dependency)
  • Creating UML sequence diagrams with lifelines and messages
  • Working with classifiers (class, interface, enumeration, collaboration)

Covers:

  • UML class diagram shapes (shape.type = 'UmlClassifier')
  • Classifier types: Class, Interface, Enumeration, Collaboration
  • Attributes, operations, and members syntax
  • UML relationship connector types
  • UML sequence diagram (shape.type = 'UmlActivity')
  • Lifelines, messages, and fragments

ER Diagrams

📄 Read: references/entity-relationship-diagrams.md

When to read:

  • Building Entity Relationship diagrams to visualize database structure
  • Creating ER entity nodes representing database tables with fields
  • Defining field properties (primary key, foreign key, data type, constraints)
  • Adding or removing entity fields at runtime
  • Connecting entities with ER relationship connectors and multiplicity
  • Styling ER entity headers, field rows, and alternating row colors
  • Tracking entity field changes via events

Covers:

  • ErDiagrams module injection (Diagram.Inject(ErDiagrams))
  • ER entity node: shape.type = 'Er' with ErShapeModel
  • Header configuration: annotation, height, style
  • Field configuration: id, name, dataType, isPrimaryKey, isForeignKey, constraints
  • addErField / removeErField runtime methods
  • fieldDefaults: alternateRowColors, height
  • Field-level and node-level style overrides
  • erEntityChanged event for tracking field modifications
  • ER relationship connectors with ErConnectorShapeModel
  • Crow's Foot multiplicity: One, Many, ZeroOrOne, OneOrMany, ZeroOrMany, OneAndOnlyOne

Layouts

📄 Read: references/layouts.md

When to read:

  • Automatically arranging nodes in a tree, hierarchy, or radial pattern
  • Creating org charts driven by parent-child data
  • Building mind maps from data sources
  • Configuring flowchart layouts with decision/process shapes
  • Customizing layout spacing, orientation, and alignment

Covers:

  • HierarchicalTree — top-down/left-right tree layouts
  • OrganizationalChart — classic org chart with getNodeDefaults/getConnectorDefaults
  • MindMap — branching mind map layout
  • RadialTree — circular radial layout
  • Flowchart layout (automatic flow arrangement)
  • ComplexHierarchicalTree for multi-parent hierarchies
  • layout property: type, orientation, margin, horizontalSpacing, verticalSpacing
  • LayoutAnimation module
  • Layout events

Swimlanes

📄 Read: references/swimlanes.md

When to read:

  • Creating multi-lane process diagrams
  • Adding phases to represent timeline or stages
  • Configuring swimlane headers and orientation
  • Placing child nodes inside lanes
  • Using swimlane shapes from the symbol palette

Covers:

  • Swimlane shape.type = 'SwimLane'
  • Lanes and phases configuration
  • Header text, size, and orientation
  • Child nodes inside lanes
  • Swimlane palette integration
  • Swimlane interaction (add/remove lanes)

Groups and Containers

📄 Read: references/groups-and-containers.md

When to read:

  • Grouping multiple nodes for collective movement/selection
  • Adding/removing children from groups at runtime
  • Using container nodes to visually bound child nodes
  • Configuring padding, fit-to-children behavior

Covers:

  • Group node shape.type = 'Group' and children array
  • Grouping/ungrouping nodes via diagram methods
  • Adding children at runtime
  • Container node configuration
  • Padding and auto-fit behavior for containers

Symbol Palette

📄 Read: references/symbol-palette.md

When to read:

  • Adding a drag-and-drop shape sidebar to your diagram app
  • Defining custom symbol sets (palettes)
  • Customizing palette icon size, search behavior, and accordion
  • Handling symbolDragEnter/symbolDrop events

Covers:

  • SymbolPaletteComponent setup alongside DiagramComponent
  • Defining palettes with symbol arrays
  • getSymbolInfo for display customization
  • Palette accordion: expanding/collapsing groups
  • Search functionality
  • Symbol preview size configuration
  • Palette events

Data Binding

📄 Read: references/data-binding.md

When to read:

  • Generating diagrams automatically from JSON or remote data
  • Mapping id and parentId fields for hierarchy
  • Using DataManager for remote or filtered data
  • Customizing node appearance based on data properties (setNodeTemplate)
  • Connecting to a PostgreSQL or external data source

Covers:

  • dataSourceSettings property
  • id, parentId field mapping
  • DataManager with local arrays or remote URLs
  • getNodeDefaults and setNodeTemplate for data-driven styling
  • PostgreSQL data source integration
  • Rendering org charts from flat JSON data

Interaction and Tools

📄 Read: references/interaction-and-tools.md

When to read:

  • Enabling/disabling node and connector interactions (drag, resize, select)
  • Switching diagram tool modes (pointer, draw, pan)
  • Configuring diagram constraints
  • Adding custom keyboard commands or toolbar actions
  • Implementing undo/redo
  • Setting up context menus or user handles

Covers:

  • DiagramConstraints, NodeConstraints, ConnectorConstraints
  • tool property: DiagramTools.Default, ZoomPan, DrawOnce
  • Selection, drag, resize, rotate interactions
  • commands for keyboard shortcuts
  • Undo/Redo (UndoRedo module)
  • Context menu (DiagramContextMenu module)
  • User handles for custom action buttons on nodes
  • Snapping module and snap settings

Serialization and Export

📄 Read: references/serialization-and-export.md

When to read:

  • Saving and restoring diagram state as JSON
  • Exporting the diagram as PNG, JPEG, or SVG
  • Printing diagram content
  • Importing Visio (.vsdx) files
  • Migrating from EJ1 diagram format

Covers:

  • diagram.saveDiagram() and diagram.loadDiagram(json)
  • PrintAndExport module injection
  • Export settings: format, region, margin, background
  • Print dialog and options
  • Visio file import (visio.md)
  • EJ1 serialization compatibility (Ej1Serialization module)

Diagram Settings

📄 Read: references/diagram-settings.md

When to read:

  • Managing diagram layers (visibility, locking, ordering)
  • Enabling virtualization for performance with large diagrams
  • Configuring grid lines, snapping, and rulers
  • Setting page size, orientation, and margins
  • Configuring scroll behavior and limits
  • Adding tooltips to diagram elements
  • Using the Overview component for minimap navigation
  • Enabling localization or RTL support
  • Understanding accessibility features

Covers:

  • Layers: add, lock, set visibility, active layer
  • Virtualization module for large diagrams
  • Grid lines: dots, lines, snap settings
  • Ruler configuration
  • scrollSettings: scrollLimit, minZoom, maxZoom
  • pageSettings: size, orientation, background, multiplePage
  • Tooltip on nodes and connectors
  • OverviewComponent minimap setup
  • Localization and RTL
  • ARIA and keyboard accessibility

Quick Start Example

Minimal Flowchart

import { DiagramComponent, NodeModel, ConnectorModel, Inject, UndoRedo } from '@syncfusion/ej2-react-diagrams';

const nodes: NodeModel[] = [
  { id: 'start', offsetX: 300, offsetY: 80, width: 140, height: 50,
    shape: { type: 'Flow', shape: 'Terminator' }, annotations: [{ content: 'Start' }] },
  { id: 'process', offsetX: 300, offsetY: 180, width: 140, height: 50,
    shape: { type: 'Flow', shape: 'Process' }, annotations: [{ content: 'Process' }] },
  { id: 'end', offsetX: 300, offsetY: 290, width: 140, height: 50,
    shape: { type: 'Flow', shape: 'Terminator' }, annotations: [{ content: 'End' }] },
];
const connectors: ConnectorModel[] = [
  { id: 'c1', sourceID: 'start', targetID: 'process' },
  { id: 'c2', sourceID: 'process', targetID: 'end' },
];

export default function App() {
  return (
    <DiagramComponent id="diagram" width={'100%'} height={'500px'}
      nodes={nodes} connectors={connectors}
      getConnectorDefaults={(obj) => { obj.type = 'Orthogonal'; return obj; }}>
      <Inject services={[UndoRedo]} />
    </DiagramComponent>
  );
}

CSS import: @import '@syncfusion/ej2-react-diagrams/styles/material.css'; and peer CSS for ej2-base, ej2-popups, ej2-splitbuttons, ej2-navigations.


Common Patterns

Pattern 1: Org Chart from Data Source

import { DiagramComponent, HierarchicalTree, DataBinding, Inject } from '@syncfusion/ej2-react-diagrams';
import { DataManager } from '@syncfusion/ej2-data';

const data = [
  { Name: 'CEO' },
  { Name: 'CTO', ReportingPerson: 'CEO' },
  { Name: 'Dev Lead', ReportingPerson: 'CTO' },
];

export default function App() {
  return (
    <DiagramComponent id="diagram" width={'100%'} height={'500px'}
      dataSourceSettings={{ id: 'Name', parentId: 'ReportingPerson', dataManager: new DataManager(data) }}
      layout={{ type: 'OrganizationalChart' }}
      getNodeDefaults={(node) => { node.width = 120; node.height = 40; return node; }}
      getConnectorDefaults={(obj) => { obj.type = 'Orthogonal'; return obj; }}>
      <Inject services={[DataBinding, HierarchicalTree]} />
    </DiagramComponent>
  );
}

Pattern 2: Save and Load Diagram State

Use diagramInstance.saveDiagram() to serialize to JSON string; diagramInstance.loadDiagram(json) to restore. Inject UndoRedo for history support. For full examples see references/serialization-and-export.md.

Pattern 3: Diagram with Symbol Palette

Render SymbolPaletteComponent alongside DiagramComponent. Define palettes with shape arrays, set symbolHeight/symbolWidth, and users can drag shapes onto the canvas. For full examples see references/symbol-palette.md.


Module Injection Reference

Inject only the modules your diagram uses: <Inject services={[HierarchicalTree, DataBinding, UndoRedo]} />

ModulePurpose
HierarchicalTreeTree and org chart layouts
MindMapMind map layout
RadialTreeRadial/circular layout
ComplexHierarchicalTreeMulti-parent hierarchies
DataBindingData source integration
UndoRedoUndo/redo history
SnappingGrid snapping
PrintAndExportExport & print
BpmnDiagramsBPMN shapes
ErDiagramsER diagram shapes and relationships
LayoutAnimationAnimated layouts
DiagramContextMenuRight-click context menu
ConnectorBridgingBridge overlapping connectors
ConnectorEditingEdit connector segments
Ej1SerializationLoad EJ1 diagram JSON

Key Props

PropTypeDescription
nodesNodeModel[]Array of node definitions
connectorsConnectorModel[]Array of connector definitions
layoutLayoutModelAutomatic layout configuration
dataSourceSettingsDataSourceModelData source for auto-generated diagrams
getNodeDefaults(node) => NodeModelDefault properties for all nodes
getConnectorDefaults(obj) => ConnectorModelDefault properties for all connectors
setNodeTemplate(node) => DiagramElementCustom template rendering for nodes
toolDiagramToolsActive interaction tool mode
snapSettingsSnapSettingsModelGrid and snap configuration
scrollSettingsScrollSettingsModelScroll limits and zoom bounds
pageSettingsPageSettingsModelPage size, orientation, background
constraintsDiagramConstraintsEnable/disable diagram-level interactions
widthstringDiagram canvas width (e.g., '100%')
heightstringDiagram canvas height (e.g., '600px')

Related Components

  • Chart - Data-driven charts and graphs
  • Kanban - Kanban board visualization
  • Data Grid - Tabular data display

FAQ

What does the syncfusion-react-diagram skill do?

Create and customize visual diagrams in React using Syncfusion Diagrams. Trigger for requests involving React component setup, nodes and connectors, flowcharts, org charts, process diagrams, BPMN or UML models, ER diagrams, layout algorithms, swimlanes, symbol palettes, and interactive diagram visualization features.

How do I install syncfusion-react-diagram?

Run npx skills add https://github.com/syncfusion/react-ui-components-skills --skill syncfusion-react-diagram in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/syncfusion-react-diagram/ (personal) or .claude/skills/syncfusion-react-diagram/ (project).

Which AI agents can use syncfusion-react-diagram?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is syncfusion-react-diagram safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains syncfusion-react-diagram?

It is published by syncfusion in syncfusion/react-ui-components-skills. It has 720 recorded installs.

More from syncfusion/react-ui-components-skills

View all →

syncfusion-react-grid

syncfusion/react-ui-components-skills

Implements Syncfusion React Grid component for feature-rich data tables and grids. Use this when working with data display, sorting, filtering, grouping, aggregates, editing, or exporting. This skill covers grid configuration, CRUD operations, virtual scrolling or infinite scrolling, hierarchy grids, state persistence, and advanced data management features for data-intensive applications.

Frontend & Design824 installs

syncfusion-react-scheduler

syncfusion/react-ui-components-skills

Implement Syncfusion React Scheduler component for calendar, event scheduling, and appointment management. Use this when building scheduling systems, calendar applications, booking systems, or time management interfaces. Covers all scheduler views (Day, Week, Month, Timeline, Agenda, Year), data binding, resource scheduling, recurring events, CRUD operations, drag-and-drop scheduling, customization, accessibility, and advanced features.

Frontend & Design784 installs

syncfusion-react-gantt-chart

syncfusion/react-ui-components-skills

Implement, configure, and customize the Syncfusion React Gantt Chart component. Use this when building project scheduling applications with task timelines, dependencies, resource management, and calendar-driven scheduling. Covers GanttComponent setup, task constraints, taskbar customization, filtering, sorting, Excel/PDF export, critical path analysis, milestones, predecessors, resource view, baseline tracking, and task calendar configuration.

Frontend & Design774 installs

syncfusion-react-rich-text-editor

syncfusion/react-ui-components-skills

Implements the Syncfusion React Rich Text Editor (RichTextEditorComponent) from ej2-react-richtexteditor, supporting HTML (WYSIWYG) and Markdown editing. Use this skill for toolbar configuration, image/video/audio insertion, paste cleanup, AI assistant integration, emoji picker, slash menu, mentions, import/export Word/PDF, form validation, and source code view in React applications.

Frontend & Design758 installs

syncfusion-react-charts

syncfusion/react-ui-components-skills

Implement Syncfusion React Charts component for data visualization. Use this when creating charts, configuring axes and series, or customizing visualization styles. This skill covers chart types, data binding, user interactions, financial indicators, accessibility features, and professional data visualization in React applications.

Frontend & Design750 installs

syncfusion-react-treegrid

syncfusion/react-ui-components-skills

Implements Syncfusion React TreeGrid for hierarchical data with sorting, filtering, editing, exporting, paging, virtual scrolling, and advanced features. Supports configuration, CRUD, aggregates, templates, state persistence, and performance optimization in React applications.

Frontend & Design747 installs

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs