https://github.com/chrisjpatty/flume
Extract logic from your apps with a user-friendly node editor powered by React.
https://github.com/chrisjpatty/flume
flume javascript node react
Last synced: 9 months ago
JSON representation
Extract logic from your apps with a user-friendly node editor powered by React.
- Host: GitHub
- URL: https://github.com/chrisjpatty/flume
- Owner: chrisjpatty
- License: mit
- Created: 2020-03-01T07:46:21.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-23T00:14:38.000Z (11 months ago)
- Last Synced: 2025-05-06T05:06:32.172Z (9 months ago)
- Topics: flume, javascript, node, react
- Language: TypeScript
- Homepage: https://flume.dev
- Size: 8.08 MB
- Stars: 1,533
- Watchers: 36
- Forks: 151
- Open Issues: 87
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-node-based-uis - flume - Business logic graph editor (Javascript Libraries / Misc)
- awesome-list - flume - friendly node editor powered by React. | chrisjpatty | 715 | (JavaScript)
README

[](https://www.npmjs.com/package/flume) [](https://standardjs.com) [](https://bundlephobia.com/result?p=flume)
# Flume
## Guides & Examples
[flume.dev](https://flume.dev)
## Install
```bash
npm install --save flume
```
## Usage
### Defining your nodes
Import `FlumeConfig` and use it to define the nodes and ports that will make up your node editor.
```jsx
import { FlumeConfig, Controls, Colors } from "flume";
const flumeConfig = new FlumeConfig()
flumeConfig
.addPortType({
type: "number",
name: "number",
label: "Number",
color: Colors.red,
controls: [
Controls.number({
name: "num",
label: "Number"
})
]
})
.addNodeType({
type: "number",
label: "Number",
initialWidth: 150,
inputs: ports => [
ports.number()
],
outputs: ports => [
ports.number()
]
})
.addNodeType({
type: "addNumbers",
label: "Add Numbers",
initialWidth: 150,
inputs: ports => [
ports.number({name: "num1"}),
ports.number({name: "num2"})
],
outputs: ports => [
ports.number({name: "result"})
]
})
```
### Rendering the node editor
To render the node editor, import `NodeEditor` and pass it your nodeTypes and portTypes from the configuration you created.
```jsx
import React from 'react'
import { NodeEditor } from 'flume'
import config from './config'
const App = () => {
return (
// Give the wrapper a width & height
)
}
```
For more complete documentation visit: [flume.dev](https://flume.dev)
## License
MIT © [chrisjpatty](https://github.com/chrisjpatty)