Render flowcharts from a text description directly in a web page
Add auto-generated diagrams to a documentation site without design tools
Create conditional branch diagrams using yes/no decision nodes
Generate flowchart images from the command line via the diagrams CLI tool
Requires the Raphael library for SVG rendering, no npm install docs, designed for browser use via CDN.
Flowchart.js is a JavaScript library that turns simple text descriptions into flowchart diagrams. Instead of dragging and dropping shapes in a diagramming tool, you write a short plain-text script that describes your nodes and the connections between them, and the library renders it as a clean SVG image in the browser. The text format has two parts. First you define each step (called a node) by giving it a name, a type, and a label. Types include start, end, operation, condition, input, output, subroutine, and parallel. Then in a separate section you write out the connections using arrows, like nodeA->nodeB->nodeC. Condition nodes branch two ways based on yes or no answers. Parallel nodes can split into multiple simultaneous paths. You can also attach external links to nodes and optionally highlight specific paths with custom colors and line widths. The library runs in the browser and requires a separate library called Raphael for rendering SVG. It is available through CDNJS so you can include it in a web page without downloading anything. There is also a command-line tool (via a separate project called diagrams) if you want to generate flowchart images from a terminal rather than a browser. Nodes and connections are defined separately in the syntax, which means you can reuse the same node in multiple connections without redefining it. Visual styling can be changed per node or per connection directly in the text, without needing a separate config file. The project is open source. The README is thorough on syntax but does not describe installation for a Node.js project, pointing instead to the demo HTML file and the CDN for browser use.
← adrai on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.