@antv/x6-react-shape
X6 shape for rendering react components.
Last updated 4 years ago by bubkoo .
MIT · Repository · Bugs · Original npm
$ cnpm install @antv/x6-react-shape 
SYNC missed versions from official npm registry.

@antv/x6-react-shape

x6 shape for rendering react components

Installation

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

# yarn
$ yarn add @antv/x6-react-shape

Usage

import { Graph } from '@antv/x6'
import '@antv/x6-react-shape'

// render
graph.addNode({
  shape: 'react-shape',
  x: 32,
  y: 48,
  width: 180,
  height: 40,
  component: (
    <div
      style={{
        color: '#fff',
        width: '100%',
        height: '100%',
        background: '#597ef7',
        textAlign: 'center',
        lineHeight: '40px',
      }}
    >
      This is a react element
    </div>
  ),
})

Current Tags

  • 2.0.0-beta.3                                ...           beta (3 years ago)
  • 1.6.3                                ...           latest (3 years ago)

5 Versions

  • 2.0.0-beta.3                                ...           3 years ago
  • 1.6.3                                ...           3 years ago
  • 1.6.0                                ...           4 years ago
  • 1.3.6-beta.1                                ...           4 years ago
  • 1.5.2                                ...           4 years ago

Copyright 2013 - present © cnpmjs.org