
syncfusion-javascript-diagram
Create and edit visual diagrams with Syncfusion JavaScript Diagram (flowcharts, BPMN, swimlanes, UML, org charts, network topologies). Trigger for diagram rendering, node/connector modeling, layouts, data binding, palettes, interactive tools, exporting, and workflow visualization tasks.
- Installs
- 64
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/syncfusion/javascript-ui-controls-skills --skill syncfusion-javascript-diagram- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads syncfusion-javascript-diagram automatically when relevant.
- 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.
⚠️ STRICT USAGE RULES — MANDATORY FOR ALL CODE GENERATION
These rules are non-negotiable and must be followed for every code generation request.
Rule A — Use Only Provided Reference Files
- Always read
references/getting-started.mdfor every request - Read additional reference files only if they match the user's query (see Navigation Guide below)
- No external knowledge allowed:
- ❌ Do NOT use internet documentation
- ❌ Do NOT use training-data assumptions about Syncfusion APIs
- ❌ Do NOT reference older EJ1 APIs or deprecated syntax
- ✅ If a feature cannot be confirmed from reference files, apply Rule B
Rule B — No Guessing, No Inference
If a feature, property, API, or behavior is not explicitly documented in the reference files:
You must NOT:
- Invent class properties, subclasses, or constructor overloads
- Infer JavaScript/TypeScript callback signatures or method names
- Assume module injections exist beyond those documented
- Generalize from other Syncfusion components
- Use deprecated or undocumented shape types
Instead, respond with:
⚠️ NOT DOCUMENTED: [feature name] is not covered in the reference files.
Skipping this feature to avoid generating incorrect code.
Rule C — Enforce Required Module Injections
Before generating code for these features, always include the corresponding injection:
| Feature | Required Injection |
|---|---|
| Entity Relationship Diagrams | Diagram.Inject(ErDiagrams) |
| BPMN diagrams | Diagram.Inject(BpmnDiagrams) |
| Export / Print | Diagram.Inject(PrintAndExport) |
| Mind Map layout | Diagram.Inject(MindMap) |
| Complex Hierarchical layout | Diagram.Inject(ComplexHierarchicalTree) |
| Hierarchical or Organizational layout | Diagram.Inject(HierarchicalTree) |
| UML Sequence Diagrams | No additional injection required |
| Undo/Redo | Diagram.Inject(UndoRedo) |
| Line Distribution | Diagram.Inject(LineDistribution) |
| Line Routing | Diagram.Inject(LineRouting) |
| Mermaid Syntax | Diagram.Inject(FlowchartLayout, DataBinding) or Diagram.Inject(MindMap, DataBinding) |
Do NOT assume any other injections exist unless confirmed in reference files.
Diagram Component Overview
The Diagram control is a feature-rich component for creating interactive, editable diagrams in TypeScript/JavaScript applications.
Core Elements
| Element | Purpose | Common Properties |
|---|---|---|
| Nodes | Graphical shapes representing entities | id, offsetX, offsetY, width, height, shape, style |
| Connectors | Lines/arrows connecting nodes | id, sourceID, targetID, type, style, targetDecorator |
| Labels | Text annotations on nodes/connectors | content, font, alignment, offset |
Key Features
✅ Automatic Layout (flowchart, hierarchical, organizational)
✅ Data Binding (JSON, parent-child relationships)
✅ Interactive Tools (drawing, selection, pan, zoom, drag-drop)
✅ Styling (CSS customization, themes, conditional styles)
✅ Serialization (save/load as JSON)
✅ Export (PNG, JPG, SVG, PDF)
✅ User Interactions (events, constraints, undo/redo)
Navigation Guide
Always read references/getting-started.md first, then read only files relevant to the request.
| Reference File | Read When the Query Involves |
|---|---|
| 📄 getting-started.md | Every request — Package installation, imports, first diagram, initialization |
| 📄 nodes-and-shapes.md | Creating/styling nodes, shapes, positioning, BPMN/UML shapes, annotations |
| 📄 connectors-and-connections.md | Lines (Straight/Orthogonal/Bezier), arrows, routing, sourceID/targetID, segments |
| 📄 labels-and-annotations.md | Text labels, font, alignment, hyperlinks on nodes/connectors |
| 📄 ports.md | Connection points, port positioning, port constraints |
| 📄 shapes-and-styles.md | Flow/Basic/Path/Image/HTML/Native shapes, fill, stroke, gradient, opacity |
| 📄 data-binding-and-loading.md | DataSourceSettings, JSON loading, parent-child mapping, dynamic updates |
| 📄 layout-and-automation.md | Hierarchical, org chart, mind map, radial, symmetric layouts, orientation |
| 📄 bpmn-diagrams.md | BPMN module injection, events, gateways, activities, data objects, annotations |
| 📄 uml-diagrams.md | UML class diagrams, UML sequence diagrams, classifiers, relationships, participants, messages, fragments |
| 📄 entity-relationship-diagrams.md | ER entities, entity fields, data types, primary/foreign keys, relationships, Crow's Foot multiplicity, ERD styling |
| 📄 swimlanes.md | Swimlane structure, lanes, phases, header config, interaction |
| 📄 groups-and-containers.md | Grouping nodes, Canvas/Stack/Grid containers, nesting, boundaries |
| 📄 symbol-palette.md | SymbolPaletteComponent, drag-drop, categories, custom symbols, search |
| 📄 interaction-and-tools.md | Drawing tools, selection, constraints, pan/zoom, events, undo/redo |
| 📄 styling-and-appearance.md | CSS theming, colors, fonts, accessibility, responsive design |
| 📄 serialization-and-export.md | Save/load diagrams as JSON, prevent defaults, detect unsaved changes, export to image/PDF/Visio, Mermaid syntax, uploader support |
| 📄 diagram-settings.md | Layers, virtualization, grid, ruler, scroll, page settings, tooltip, localization |
| 📄 advanced-features.md | Undo/redo, custom commands, toolbars, performance optimization |
Quick Start
1. Install Package
npm install @syncfusion/ej2-diagrams
2. Import Required Modules
import { Diagram, NodeModel, ConnectorModel } from '@syncfusion/ej2-diagrams';
3. Create Diagram with Nodes & Connectors
// Define nodes
let nodes: NodeModel[] = [
{
id: 'node1',
offsetX: 250,
offsetY: 250,
width: 100,
height: 100,
style: { fill: '#6BA5D7' },
annotations: [{ content: 'Start' }]
},
{
id: 'node2',
offsetX: 400,
offsetY: 250,
width: 100,
height: 100,
style: { fill: '#FFD700' },
annotations: [{ content: 'Process' }]
}
];
// Define connector between nodes
let connectors: ConnectorModel[] = [
{
id: 'connector1',
sourceID: 'node1',
targetID: 'node2',
style: { strokeColor: '#6BA5D7' },
targetDecorator: { shape: 'Arrow' }
}
];
// Create diagram
let diagram: Diagram = new Diagram({
width: '100%',
height: '500px',
nodes: nodes,
connectors: connectors
});
diagram.appendTo('#diagram-container');
HTML:
<div id="diagram-container"></div>
Common Patterns
Flowchart Pattern
Creating a simple flowchart with decision points:
- Use rectangle shapes for processes
- Use diamond shapes for decisions
- Connect with arrows
- Apply Flowchart auto-layout
Organizational Chart Pattern
Creating hierarchical structures:
- Use data binding with parent-child relationships
- Apply HierarchicalTree layout
- Define employee nodes with names/photos
- Show reporting relationships via connectors
Network Diagram Pattern
Creating system architecture diagrams:
- Use predefined shapes (server, database, client)
- Connect with labeled lines showing data flow
- Organize using grid-based positioning
- Add icons and styling for clarity
Interactive Diagram Pattern
Building user-editable diagrams:
- Enable drawing tools
- Allow node/connector creation and deletion
- Add context menus for operations
- Implement save/load with serialization
- Handle user events (selection, drag, resize)
When to Use This Skill
✅ Creating any diagram type in TypeScript/JavaScript
✅ Building flowcharts, process flows, or hierarchies
✅ Implementing BPMN or UML diagrams
✅ Configuring node/connector shapes, styles, annotations
✅ Setting up automatic layouts
✅ Adding symbol palettes for drag-and-drop
✅ Binding diagram data from APIs or JSON
✅ Exporting diagrams or printing
✅ Enabling drawing tools, undo/redo, layers
Do NOT use for: Simple static charts or graphs (use Chart component), data tables (use Grid component)
Key TypeScript Interfaces
| Interface | Purpose | Key Properties |
|---|---|---|
NodeModel | Node configuration | id, offsetX, offsetY, width, height, shape, style, annotations |
ConnectorModel | Connector configuration | id, sourceID, targetID, type, style, targetDecorator |
ShapeModel | Shape definition | type (Basic/BPMN/UML/Flow), shape name |
AnnotationModel | Label on node/connector | content, font, alignment, offset |
PortModel | Connection point | id, offset, shape, visibility, constraints |
Common Shape Types
Flow Shapes
Terminator, Process, Decision, Document, DirectData, MultiDocument, PreDefinedProcess, Delay, Annotation, ManualOperation, ManualInput, Card, Or, SummingJunction, Extract, Merge, Sort, OffPageReference
Usage:
shape: { type: 'Flow', shape: 'Process' }
Basic Shapes
Rectangle, Ellipse, Triangle, Pentagon, Hexagon, Heptagon, Octagon, Star, Cross, Diamond, CylindricalShape, Trapezoid, Parallelogram, Rhombus
Usage:
shape: { type: 'Basic', shape: 'Rectangle' }
FAQ
What does the syncfusion-javascript-diagram skill do?
Create and edit visual diagrams with Syncfusion JavaScript Diagram (flowcharts, BPMN, swimlanes, UML, org charts, network topologies). Trigger for diagram rendering, node/connector modeling, layouts, data binding, palettes, interactive tools, exporting, and workflow visualization tasks.
How do I install syncfusion-javascript-diagram?
Run npx skills add https://github.com/syncfusion/javascript-ui-controls-skills --skill syncfusion-javascript-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-javascript-diagram/ (personal) or .claude/skills/syncfusion-javascript-diagram/ (project).
Which AI agents can use syncfusion-javascript-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-javascript-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-javascript-diagram?
It is published by syncfusion in syncfusion/javascript-ui-controls-skills. It has 64 recorded installs.
More from syncfusion/javascript-ui-controls-skills
syncfusion-javascript-grid
syncfusion/javascript-ui-controls-skills
Implements Syncfusion JavaScript 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, hierarchy grids, state persistence, and advanced data management features for data-intensive applications.
syncfusion-javascript-common
syncfusion/javascript-ui-controls-skills
Common utilities and features for Syncfusion JavaScript controls. Use this skill when the user needs to implement animations, drag-and-drop, state persistence, RTL support, localization, globalization, security, templates, and advanced features for Syncfusion JavaScript controls.
syncfusion-javascript-popups
syncfusion/javascript-ui-controls-skills
Comprehensive guide for implementing Syncfusion EJ2 JavaScript Popup components including Dialog, Predefined Dialog (DialogUtility), and Tooltip. Use this when building modal/modeless dialogs, alert/confirm windows, draggable dialogs, resizable windows, popovers, tooltips, and overlaid content with custom positioning, animations, WCAG 2.2 accessibility, forms integration, and event handling in TypeScript/JavaScript applications.
syncfusion-javascript-license
syncfusion/javascript-ui-controls-skills
Use this skill when the user asks about Syncfusion JavaScript licensing, license keys, license registration, license validation errors, trial licenses, or license troubleshooting. This skill provides comprehensive guidance on generating, registering, and managing Syncfusion license keys for JavaScript applications, including edition-based and platform-based licensing models, registration methods, CI/CD integration, and resolving common licensing errors.
syncfusion-javascript-dropdowns
syncfusion/javascript-ui-controls-skills
Comprehensive guide for implementing Syncfusion TypeScript dropdown components including AutoComplete, ComboBox, Mention, Dropdownlist, Multiselect, ListBox, and MultiColumn ComboBox. Use this when building selection interfaces, data binding, filtering, cascading dropdowns, dual list transfer, custom templates, and accessible dropdown experiences.
syncfusion-javascript-tab
syncfusion/javascript-ui-controls-skills
This skill enables creating and customizing Syncfusion TypeScript Tab components, including tab navigation, tab headers, styling, responsive layouts, dynamic content loading, animations, and multi-panel organization.
Popular docs & writing skills
grill-with-docs
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
lark-markdown
open.feishu.cn
飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。
writing-beats
mattpocock/skills
Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.
writing-shape
mattpocock/skills
Writing, exploit: shape raw material into an article, paragraph by paragraph.
writing-fragments
mattpocock/skills
Writing, explore: mine raw fragments, no structure yet.
writing-for-agents
mattpocock/skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.