🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

@antv/x6

Package Overview
Dependencies
Maintainers
71
Versions
416
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/x6

JavaScript diagramming library that uses SVG and HTML for rendering

latest
Source
npmnpm
Version
3.0.1
Version published
Weekly downloads
66K
20.27%
Maintainers
71
Weekly downloads
 
Created
Source

English | 简体中文

X6: Graph Editing and Visualization Engine

x6 flow

NPM Package build coverage Package size NPM Downloads MIT License Language PRs Welcome website

Official DocumentationQuick StartGraph ExamplesFAQDemo TemplateAwesome X6

AntV X6 is a graph editing engine based on HTML and SVG, providing low-cost customization capabilities and out-of-the-box built-in extensions that make it easy to quickly build applications such as DAG diagrams, ER diagrams, flowcharts, lineage graphs, and more. We hope developers can use X6 to rapidly build various graph editing applications they need, making process relationship data controllable, interactive, and visualized.

✨ Features

As a professional graph editing and visualization engine, X6 has the following features:

  • 🌱 Highly Customizable: Supports customizing node styles and interactions using SVG / HTML / React / Vue / Angular, with a comprehensive event system that allows listening to any events occurring within the chart.
  • 🚀 Out-of-the-Box: Built-in 10+ graph editing extensions, such as lasso selection, alignment lines, minimap, etc.
  • 🧲 Data-Driven: Based on the MVC architecture, allowing users to focus more on data logic and business logic.
  • 💯 Server-Side Rendering: Supports server-side rendering with good browser compatibility.

🔨 Getting Started

You can install via package managers like NPM or Yarn.

# npm
$ npm install @antv/x6 --save

# yarn
$ yarn add @antv/x6

After successful installation, you can import the Graph object using import.

<div id="container" style="width: 600px; height: 400px"></div>
import { Graph } from '@antv/x6'

const graph = new Graph({
  container: document.getElementById('container'),
  grid: true,
})

const source = graph.addNode({
  x: 300,
  y: 40,
  width: 80,
  height: 40,
  label: 'Hello',
});

const target = graph.addNode({
  x: 420,
  y: 180,
  width: 80,
  height: 40,
  label: 'World',
});

graph.addEdge({
  source,
  target,
});

If everything goes smoothly, you will get a simple flowchart canvas as shown below.

🧑🏻‍💻 Local Development

# Install project dependencies and initialize build
$ pnpm install

# Start examples to view results
pnpm run start:examples

📮 Contribution

Thank you to everyone who has contributed to this project and all supporters! 🙏

Contribution Leaderboard
  • Issue Feedback: If you encounter any issues with X6 during use, feel free to submit an Issue along with minimal reproducible code.
  • Contribution Guide: How to participate in the development and contribution of X6.
  • Discussion Ideas: Discuss on GitHub Discussion or DingTalk group.

📄 License

MIT.

Keywords

graph

FAQs

Package last updated on 22 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts