Skip to content

antvis/XFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
Jan 14, 2022
Oct 18, 2023
Jan 24, 2024
Oct 11, 2024
Sep 5, 2024
Nov 28, 2023
Oct 18, 2023
Oct 18, 2023
Nov 8, 2023
Oct 18, 2023
Oct 18, 2023
Oct 18, 2023
Jul 20, 2024
Oct 18, 2023
Oct 18, 2023
Oct 18, 2023
Oct 18, 2023
Jan 24, 2024
Oct 18, 2023
Oct 18, 2023
Jul 1, 2024
Oct 18, 2023
Feb 19, 2025
Oct 18, 2023
Jan 15, 2024
Nov 22, 2023
Nov 22, 2023
Oct 18, 2023
Oct 18, 2023
Oct 18, 2023
Nov 8, 2023
Sep 4, 2024
Oct 18, 2023

Repository files navigation

English (US) | 简体中文

React component for building interactive diagrams

Features

  • 🌱   Easy-to-use: Provides a more appropriate way to use React components.
  • 🚀   Unified state management: Service data and graph data can be managed in a unified manner.
  • 🧲   Supports multi-graph mode: Each graph component has a separate state and graph instance.
  • 💯   Out of the box features: There are a lot of diagram components out of the box.

Installation

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

# yarn
$ yarn add @antv/xflow

# pnpm
$ pnpm add @antv/xflow

Usage

const Page = () => {
  return (
    <XFlow>
      <XFlowGraph
        zoomable
        pannable
        centerView
        fitView
        connectionEdgeOptions={{
          attrs: {
            line: {
              stroke: '#8f8f8f',
              strokeWidth: 1,
            },
          },
        }}
      />
      <Grid type="mesh" options={{ color: '#ccc', thickness: 1 }} />
      <Clipboard />
      <History />
      <Snapline sharp />
      <Transform resizing rotating />
    </XFlow>
  );
};

Documentation

The documentation for XFlow 2.0 is still being developed urgently, so if you want to know how to use it, you can refer to the code examples.

Development

$ pnpm bootstrap
$ pnpm dev

Contributing

To become a contributor, please follow our contributing guide. If you are an active contributor, you can apply to be a outside collaborator.

Contributors

License

The scripts and documentation in this project are released under the MIT License.