React components for building x6 editors
npm install @antv/x6-react-components> React components for building x6 editors
 
  
- Menu
- Dropdown
- ContextMenu
- Menubar
- Toolbar
- SplitBox
- ScrollBox
- AutoScrollBox
- ColorPicker
``shellnpm
$ npm install @antv/x6-react-components --save
Usage
Import component and style:
`ts
import { Menu } from '@antv/x6-react-components/es/menu'
// less
import '@antv/x6-react-components/es/menu/style'
// or css
import '@antv/x6-react-components/es/menu/style/index.css'
`We strongly recommend using babel-plugin-import, which can convert the following code to the '@antv/x6-react-components/es/xxx' way:
`ts
import { Menu } from '@antv/x6-react-components'
`And this plugin will also load corresponding styles too. Via
.babelrc or babel-loader:`js
{
"plugins": [
[
"import",
{
"libraryName": "@antv/x6-react-components",
"libraryDirectory": "es", // es or lib
"style": true,
"transformToDefaultImport": true
}
]
]
}
``Pull requests and stars are highly welcome.
For bugs and feature requests, please create an issue.