Token导航 LogoToken导航

Agent Skill · 前端设计

syncfusion-react-diagram(syncfusion React diagram 前端)

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

syncfusion-react-diagram 是前端设计类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描有提醒项,按安装量在前端设计类的 10,216 个 Skill 里排第 2,792。

总安装 1,891周安装 78GitHub Stars 1下载 618核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:syncfusion-react-diagram(syncfusion React diagram 前端)
来源仓库:https://github.com/syncfusion/react-ui-components-skills
仓库路径:skills/syncfusion-react-diagram
安装命令:
npx skills add https://github.com/syncfusion/react-ui-components-skills --skill syncfusion-react-diagram
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

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

这个 Skill 是做什么的

前端设计类 Skill 关注页面结构、视觉规范和组件写法,输出通常是可运行的界面代码。

用于辅助 React 前端页面、组件、样式和交互逻辑的开发与维护。适合生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

通过 GitHub 安装,支持 Codex、Claude、Cursor、Gemini CLI 等宿主环境。需确保项目已集成 Syncfusion React 组件库,否则可能无法正常运行相关功能。

来源仓库内路径:skills/syncfusion-react-diagram

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/syncfusion/react-ui-components-skills --skill…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

syncfusion-react-diagram 怎么安装?

在终端执行 npx skills add https://github.com/syncfusion/react-ui-components-skills --skill syncfusion…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

syncfusion-react-diagram 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

syncfusion-react-diagram 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/syncfusion/react-ui-components-skills --skill syncfusion-react-diagram 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

syncfusion-react-diagram 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

syncfusion-react-diagram 用的人多吗?

公开数据是累计安装 1,891 次,近一周安装 78 次,下载 618 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

syncfusion-react-diagram 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理前端设计类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

前端设计类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
frontend-design

前端设计 · Codex、Claude

8,823,360126,072只读MIT通过
vercel-composition-patterns

Vercel 组合模式 · Codex、Claude

3,858,81625,893需要联网MIT通过
vercel-react-native-skills

Vercel React native skills 前端 · Codex、Claude

2,468,66425,878只读MIT通过
adapt

adapt 搜索 · Codex、Claude

2,027,04023,125操作浏览器未明确通过
bolder

bolder 分析 · Codex、Claude

2,004,28823,130只读未明确通过
syncfusion-react-diagram

syncfusion React diagram 前端 · 本页

1,8911执行命令未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

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

- Getting Started - Nodes - Connectors - Labels and Annotations - Ports - Shapes and Styles - BPMN Diagrams - UML Diagrams - Layouts - Swimlanes - Groups and Containers - Symbol Palette - Data Binding - Interaction and Tools - Serialization and Export - Diagram Settings

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

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
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

平台分布

Codex

36.04%
按下载量换算223

Claude

28.33%
按下载量换算175

Cursor

16.78%
按下载量换算104

Gemini CLI

9.21%
按下载量换算57

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/syncfusion/react-ui-components-skills --skill syncfusion-react-diagram 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills