🌜
🌞
@antv/x6-react-shape

@antv/x6-react-shape

v1.6.1

X6 shape for rendering react components.

npm install @antv/x6-react-shape

README

@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>
  ),
})

General

License
MIT
Typescript Types
Built-in
Tree-shakeable
Yes

Popularity

GitHub Stargazers
3,817
Community Interest
3,213
Number of Forks
1,208

Maintenance

Commits
10/219/220200
Last Commit
Open Issues
136
Closed Issues
1,394
Open Pull Requests
3
Closed Pull Requests
80

Versions

Versions Released
10/219/2202
Latest Version Released
Jul 11, 2022
Current Tags
latest1.6.1
beta2.0.1-beta.5

Contributors

bubkoo
bubkoo
Commits: 1,895
NewByVector
NewByVector
Commits: 315
semantic-release-bot
semantic-release-bot
Commits: 309
afc163
afc163
Commits: 14
wtzeng1
wtzeng1
Commits: 12
OpportunityLiu
OpportunityLiu
Commits: 4
Eve-Sama
Eve-Sama
Commits: 4
zdc1111
zdc1111
Commits: 4
qianjujie
qianjujie
Commits: 3
yangling1996
yangling1996
Commits: 2
sscfaith
sscfaith
Commits: 2
lvhuiyang
lvhuiyang
Commits: 2
xrkffgg
xrkffgg
Commits: 2
daigang666
daigang666
Commits: 2
lyn-boyu
lyn-boyu
Commits: 2