flow-ui-react
A visualization react component library
Quickstart
npm i flow-ui-react
import { Tree } from "flow-ui-react";
const data = {
name: "Bob",
children: [
{ name: "Jane" },
{
name: "Cindy",
children: [{ name: "Billy" }]
}
]
};
const treeProps = {
direction: "down",
rootPosition: [svgWidth / 2, svgHeight / 2],
spacing: {
parentChild: 100,
sibling: 20
},
nodeDiameter: 10,
data
};
const App = () => (
<div>
<svg>{<Tree {...treeProps} />}</svg>
</div>
);
API
Link
Node
Tree
Uses Link and Node components
Local Development
Establish link
- Create output link
yarn link
- Create input link
yarn link flow-ui-react
Making changes
-
Make sure you're linked
-
Build
yarn build
Publishing to npm