Have ideas to improve npm?Join in the discussion! »

    @antv/x6-react-shape
    TypeScript icon, indicating that this package has built-in type declarations

    1.4.1 • Public • Published

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

    Install

    npm i @antv/x6-react-shape

    DownloadsWeekly Downloads

    1,227

    Version

    1.4.1

    License

    MIT

    Unpacked Size

    152 kB

    Total Files

    53

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar