Loading repository data…
Loading repository data…
getartisanflow / repository
The flowchart engine Alpine.js never had. Directive-driven node-based UIs with animation, layout, and collaboration.
A directive-driven flow diagram and node-graph engine for Alpine.js -- interactive flowcharts, diagrams, and visual editors with a simple x-flow-* API.
npm install @getartisanflow/alpineflow alpinejs
import Alpine from 'alpinejs';
import AlpineFlow from '@getartisanflow/alpineflow';
Alpine.plugin(AlpineFlow);
Alpine.start();
<div x-data="flowCanvas({
nodes: [
{ id: '1', position: { x: 0, y: 0 }, data: { label: 'Hello' } },
{ id: '2', position: { x: 200, y: 100 }, data: { label: 'World' } },
],
edges: [
{ id: 'e1', source: '1', target: '2' },
],
})">
<div x-flow-viewport>
<template x-for="node in nodes" :key="node.id">
<div x-flow-node="node" x-text="node.data.label"></div>
</template>
</div>
</div>
@import '@getartisanflow/alpineflow/css'; /* structural (required) */
@import '@getartisanflow/alpineflow/theme'; /* default theme (optional) */
x-flow-* directives, no framework boilerplate# Layout engines (install only what you need)
npm install @dagrejs/dagre # for @getartisanflow/alpineflow/dagre
npm install elkjs # for @getartisanflow/alpineflow/elk
npm install d3-force # for @getartisanflow/alpineflow/force
npm install d3-hierarchy # for @getartisanflow/alpineflow/hierarchy
# Whiteboard tools
import AlpineFlowWhiteboard from '@getartisanflow/alpineflow/whiteboard';
# Real-time collaboration
npm install yjs y-websocket y-protocols
import AlpineFlowCollab from '@getartisanflow/alpineflow/collab';
Full documentation is available at artisanflow.dev.
Follow the journey of building AlpineFlow and WireFlow at zachiler.dev.
AlpineFlow was inspired by React Flow and its core architecture. Special thanks to the React Flow team for pioneering the open-source node-based UI space.
MIT -- Created by Zac Hiler