react-cola
WebCola for React.
🚀 Getting Started
Using npm
:
npm install --save react-cola
Using yarn
:
yarn add react-cola
✍️ Example
Below is a basic example of how to define a simple renderLayout
prop, which will be called whenever the layout has been updated by WebCola.
;;; <WebCola renderLayout= <> layout layoutlinks layout </> nodes= width: 60 height: 40 name: 'a' width: 60 height: 40 name: 'b' width: 60 height: 40 name: 'c' width: 60 height: 40 name: 'd' width: 60 height: 40 name: 'e' width: 60 height: 40 name: 'f' width: 60 height: 40 name: 'g' links= source: 1 target: 2 source: 2 target: 3 source: 3 target: 4 source: 0 target: 1 source: 2 target: 0 source: 3 target: 5 source: 0 target: 5 groups= leaves: 0 groups: 1 leaves: 1 2 leaves: 3 4 width=540 height=760 />;