A highly customizable streaming flow builder.
English | 简体中文
A highly customizable streaming flow builder. The registration ability can flexibly customize your nodes, different types of node display and form, etc.
https://bytedance.github.io/flow-builder
https://github.com/bytedance/flow-builder
yarn add react-flow-builder
or
npm install react-flow-builder…| Property | Description | Type | Required | Default | Version |
|---|---|---|---|---|---|
| backgroundColor | The color of background | string |
#F7F7F7 | ||
| className | The class name of the container | string |
- | ||
| draggable | drag and drop | boolean |
false | 1.0.0 | |
| DragComponent | custom drag component | React.FC\ |
- | 1.0.0 | |
| DropComponent | custom drop component | React.FC\ |
- | 1.0.0 | |
| createUuid | custom node uuid | (type?: string) => string |
- | 2.0.0 | |
| DrawerComponent | Drawer component | React.FC\ |
- | 2.0.0 | |
| PopoverComponent | Popover component | React.FC\ |
- | 2.0.0 | |
| PopconfirmComponent | Popconfirm component | React.FC\ |
- | 2.0.0 | |
| drawerProps | Extra props of DrawerComponent | any |
- | ||
| drawerVisibleWhenAddNode | Drawer visible when add node | boolean |
false | ||
| historyTool | undo and redo | boolean | HistoryToolConfig |
false | ||
| layout | Use vertical or horizontal layout | vertical | horizontal |
vertical |
||
| lineColor | The color of line | string |
#999999 | ||
| nodes | The nodes of FlowBuilder | Node[] | ✓ | - | |
| readonly | Readonly mode, cannot add, remove, configure. | boolean |
false | ||
| registerNodes | The registered nodes | RegisterNode[] | ✓ | - | |
| registerRemoteNodes | The registered remote nodes | RegisterRemoteNode[] | - | 1.3.0 | |
| showPracticalBranchNode | - | boolean |
false | 1.1.0 | |
| showPracticalBranchRemove | - | boolean |
false | 1.1.0 | |
| sortable | Condition nodes can be dragged and sorted in branch | boolean |
false | 1.4.0 | |
| sortableAnchor | Anchor for start dragging 序 | ReactNode |
- | 1.4.0 | |
| spaceX | Horizontal spacing between nodes | number |
16 |
||
| spaceY | Vertical spacing between nodes | number |
16 |
||
| zoomTool | zoom | boolean | ZoomToolConfig |
false | ||
| onChange | Callback function for when the data change | (nodes: Node[], changeEvent: string, nodeChanged?: INode) => void |
✓ | - | |
| onHistoryChange | (undoDisabled: boolean, redoDisabled: boolean) => void |
- | |||
| onZoomChange | (outDisabled: boolean, value: number, inDisabled: boolean) => void |
- | |||
| showArrow | Show arrow | boolean |
false | 1.4.5 | |
| arrowIcon | The icon of the arrow | ReactNode |
- | 1.4.5 | |
| onAddNodeSuccess | Called when add node success | (type: string, node: INode) => void |
- | 1.4.9 | |
| onDropNodeSuccess | Called when drop node success | (type: string, node: INode) => void |
- | 1.4.9 | |
| onRemoveNodeSuccess | Called when remove node success | (node: INode) => void |
- | 2.2.0 | |
| allowStartConfig | Allow start node config | boolean |
- | 2.1.0 | |
| allowEndConfig | Allow end node config | boolean |
- | 2.1.0 | |
| scrollByDrag | Scroll by mouse dragging | boolean |
- | 2.6.0 |
| Property | Description | Type | Default |
|---|---|---|---|
| hidden | boolean |
false | |
| max | number |
10 |
| Property | Description | Type | Default |
|---|---|---|---|
| hidden | boolean |
false | |
| initialValue | number |
100 | |
| min | number |
10 | |
| max | number |
200 | |
| step | number |
10 |
| Property | Description | Type | Version |
|---|---|---|---|
| onDragStart | The dragStart event of the custom drag component needs to call this method to set the dragged type( dragType in BuilderContext ) | (nodeType: string) => void |
1.0.0 |
| onDragEnd | The dragEnd event of the custom drag component needs to call this method to clear the dragged type( dragType in BuilderContext ) | () => void |
1.0.0 |
| Property | Description | Type | Version |
|---|---|---|---|
| onDrop | The drop event of the custom drop component needs to call this method to add the new node type | () => void |
1.0.0 |
| Property | Description | Type | Version |
|---|---|---|---|
| visible | You can judge the boolean value of selectedNode by yourself. | any |
2.0.0 |
| onClose | You can also call closeDrawer by yourself. | any |
2.0.0 |
| children | any |
2.0.0 | |
| title | any |
2.0.0 | |
| width | any |
2.0.0 | |
| destroyOnClose | any |
2.0.0 | |
| maskClosable | any |
2.0.0 | |
| configComponentRef | React.MutableRefObject\ |
2.5.0 |
| Property | Description | Type | Version |
|---|---|---|---|
| visible | any |
2.0.0 | |
| onVisibleChange | any |
2.0.0 | |
| children | any |
2.0.0 | |
| overlayClassName | any |
2.0.0 | |
| placement | any |
2.0.0 | |
| trigger | any |
2.0.0 | |
| content | any |
2.0.0 | |
| getPopupContainer | any |
2.0.0 |
| Property | Description | Type | Version |
|---|---|---|---|
| title | any |
2.0.0 | |
| onConfirm | You can also call removeNode yourself. | any |
2.0.0 |
| children |
No open issues yet, or sync has not completed.