Skip to main content

Mindmap

The mindmap builder highlights several advanced features JsPlumb offers such as custom layouts, parsers and exporters
Vanilla JS
React
Angular
Vue
Svelte
Typescript
JsPlumb - JavaScript and Typescript diagramming library that fuels exceptional UIs

The source code for this demo is available on Github.

Vanilla JS
Angular
React
https://github.com/jsplumb-demonstrations/mindmap-builder

If you haven't got a license for JsPlumb, we offer 30 day evaluations.

Start a free trial

What is a mindmap and how can I build one with JsPlumb?

A mindmap is a diagram that allows you to group concepts, tasks and other items around a central concept or subject. It is an intuitive means of representing the way the human mind thinks about the world.

What are mindmaps useful for?

People use mindmaps for all sorts of different purposes:

  • Brainstorming
  • Organizing research
  • Planning meetings
  • Comparing JsPlumb's features favourably to its competitors
Where did mindmaps originate?

The term mindmap was popularized by a British psychologist named Tony Buzan on a 1974 BBC TV show called Use your head, but usage of this type of diagram has been going on for hundreds of years, with recorded instances stretching back to the 3rd century.

Angular Mindmaps

JsPlumb's deep Angular integration makes building an Angular Mindmap very simple. The Mindmap builder starter app uses our ControlsComponent, SurfaceComponent, MiniviewComponent and Angular service to provide a fully featured Mindmap. Tested with Angular 16, 17, 18 and 19.

Our Mindmap also takes advantage of JsPlumb's ability to support custom layouts.

Building an app with JsPlumb Angular lets you take real advantage of everything that Angular has to offer - the tabs below show how modular the process is.

Note in the View Options tab how JsPlumb lets you map Angular components to render your node types -JsPlumb Angular slots right in seamlessly to your Angular app. These components are first class Angular components and can use Angular's dependency injection and services just as any other component in your app


import React from "react"
import { SurfaceProvider,
SurfaceComponent, ControlsComponent,
MiniviewComponent} from "@jsplumbtoolkit/browser-ui-react"

export default function MyMindmap() {

return <div className="jtk-demo-main">
<SurfaceProvider>
<div className="jtk-demo-canvas">
<SurfaceComponent viewOptions={view} renderOptions={renderOptions} ref={surface}/>
<ControlsComponent/>
<MiniviewComponent/>
</div>
<div className="jtk-demo-rhs">
<div className="description">
<h3>Mindmap Builder</h3>
<ul>
<li>Click the note icon in the upper left to inspect/edit a node.</li>
<li>Click the trashcan icon to delete a node</li>
<li>Click the + button to add a new subtopic. Subtopics can be added to the left or right of the main node.</li>
</ul>
</div>

<Inspector/>

</div>
</SurfaceProvider>

</div>
}

React Mindmaps

React Mindmaps with JsPlumb are a snap. Our Mindmap builder starter app uses JsPlumb's advanced React integration with its providers and support for functional components, to give you a solid foundation on which to base your app. JsPlumb's React integration works with all the latest releases - we've tested it on React 16, 17, 18 and 19.

Our Mindmap also takes advantage of JsPlumb's ability to support custom layouts.

Building an app with JsPlumb React lets you take real advantage of everything that React has to offer - the tabs below show how modular the process is.

Note in the View Options tab how JsPlumb lets you map arbitrary JSX to render your node types -JsPlumb React is fully composable and slots right in seamlessly to your React app.

Note also that we can encapsulate business logic inside a service - and then use Angular's DI to inject that service directly into the components we use to render our nodes.


import React from "react"
import { SurfaceProvider,
SurfaceComponent, ControlsComponent,
MiniviewComponent} from "@jsplumbtoolkit/browser-ui-react"

export default function MyMindmap() {

return <div className="jtk-demo-main">
<SurfaceProvider>
<div className="jtk-demo-canvas">
<SurfaceComponent viewOptions={view} renderOptions={renderOptions} ref={surface}/>
<ControlsComponent/>
<MiniviewComponent/>
</div>
<div className="jtk-demo-rhs">
<div className="description">
<h3>Mindmap Builder</h3>
<ul>
<li>Click the note icon in the upper left to inspect/edit a node.</li>
<li>Click the trashcan icon to delete a node</li>
<li>Click the + button to add a new subtopic. Subtopics can be added to the left or right of the main node.</li>
</ul>
</div>

<Inspector/>

</div>
</SurfaceProvider>

</div>
}

Typescript Mindmaps

JsPlumb is written in Typescript and ships with a full set of type definitions, for a seamless Typescript development experience.

JsPlumb's Surface component is the heart of the Mindmap, and JsPlumb ships a large number of useful helper components such as the Miniview, the Controls component for managing zoom, undo/redo etc, which lets you easily configure drag/drop of new elements, plus a long list of plugins. Our Mindmap also takes advantage of JsPlumb's ability to support custom layouts.

Our Typescript Mindmap builder starter app provides you with everything you need to get a solid start, and is easily extensible.

<div id="mindmap-wrapper">
<div id="canvas">
<div id="controls"></div>
</div>
<div id="palette"></div>
</div>

import { newInstance,
ControlsComponent } from "@jsplumbtoolkit/browser-ui"

export class MyMindmap() {

constructor() {

const toolkit = newInstance()
const surface = toolkit.render(document.querySelector("#canvas"), {
view:{
nodes:{
default:{
template:`<div data-jtk-target="true"></div>`
}
}
},
layout:{
type:MindMapLayout.type,
options:{

}
}
})

new ControlsComponent(document.querySelector("#controls"), surface)



}


}

Vue Mindmaps

It's easy to build a Vue Mindmap with JsPlumb - we've done most of the hard work for you in our Vue Mindmap builder starter app

Our Vue Mindmap takes advantage of JsPlumb's ability to integrate deeply with Vue, using Vue components to render nodes, and several of JsPlumb's Vue helper components and plugins such as the ControlsComponent, MiniviewComponent. Our Mindmap also takes advantage of JsPlumb's ability to support custom layouts..


<script>
import { defineComponent } from "vue";
import { loadSurface, DEFAULT_VUE_SURFACE_ID } from "@jsplumbtoolkit/browser-ui-vue3"

let surface
let toolkit

export default defineComponent({
name:"mindmap",
mounted() {
loadSurface(DEFAULT_VUE_SURFACE_ID, (s) => {
surface = s;
toolkit = surface.toolkitInstance;
})
},
methods:{
viewParams:function() {
return {
nodes:{
default:{
component:NodeComponent
}
}
}
},
renderParams:function() {
return {
layout:{
type:MindMapLayout.type,
options:{}
},
// set the size of elements from the width/height values in their backing data
useModelForSizes:true,
// on load, zoom the dataset so its all visible
zoomToFit:true
}
}
}

</script>
<template>
<div id="app">
<div class="jtk-demo-canvas">
<SurfaceComponent :renderOptions="this.renderParams()"
:viewOptions="this.viewParams()"
url="mindmap.json">
</SurfaceComponent>

<ControlsComponent/>
<MiniviewComponent/>
</div>
</div>
</template>

Svelte Mindmaps

JsPlumb's Svelte integration has everything you need to quickly build a Svelte Mindmap, and what's great is we've already pulled it all together for you in our Svelte Mindmap builder starter app

Our Svelte Mindmap uses several of JsPlumb's Svelte components, including the SurfaceComponent, ControlsComponent and MiniviewComponent, and it also takes advantage of JsPlumb's ability to support custom layouts.


<script>

const view = {
nodes:{
[DEFAULT]:{
component:NodeComponent
}
}
}

const renderOptions = {
layout:{
type:MindMapLayout.type,
options:{}
},
// set the size of elements from the width/height values in their backing data
useModelForSizes:true,
// on load, zoom the dataset so its all visible
zoomToFit:true
}


</script>
<div>
<SurfaceProvider>

<SurfaceComponent renderOptions={renderOptions}
viewOptions={view}
className="jtk-demo-canvas"
url="/mindmap.json">

<ControlsComponent/>
<MiniviewComponent/>
</SurfaceComponent>



</SurfaceProvider>
</div>
More Demos
See all demos

Flowchart builder application - JsPlumb, flowcharts, chatbots, bar charts, decision trees, mindmaps, org charts, gantt charts and more

Flowchart

Gantt chart builder application - JsPlumb, industry standard diagramming and rich visual UI Javascript library

Gantt

Chatbot builder application - JsPlumb - Angular, React, Vue, Svelte diagramming library

Chatbot

Callflow builder application - JsPlumb, industry standard diagramming and rich visual UI Javascript library

Call Flow

Kanban application - JsPlumb - JavaScript and Typescript diagramming library that fuels exceptional UIs

Kanban

Network topology diagram builder - JsPlumb, industry standard diagramming and rich visual UI Javascript library

Network Topology

Database schema builder application - JsPlumb, industry standard diagramming and rich visual UI Javascript library

Database Schema

Org Chart application - JsPlumb - Angular, React, Vue, Svelte diagramming library

Org Chart

Mindmap builder application - JsPlumb - Angular, React, Vue, Svelte diagramming library

Mindmap

Element grouping demonstration - JsPlumb - JavaScript and Typescript diagramming library that fuels exceptional UIs

Nested Groups

Path tracing demonstration - JsPlumb - When you've reached the limit with ReactFlow, we can help!

Path Tracing

Hello world demonstration - JsPlumb, flowcharts, chatbots, bar charts, decision trees, mindmaps, org charts, gantt charts and more

Hello World

Image processor application - JsPlumb, flowcharts, chatbots, bar charts, decision trees, mindmaps, org charts, gantt charts and more

Image Processor

Neighbour views dynamic selections demonstration - JsPlumb - JavaScript and Typescript diagramming library that fuels exceptional UIs

Neighbourhood Views

Active filtering demonstration - JsPlumb - Angular, React, Vue, Svelte diagramming library

Active Filtering

Org chart layout demonstration - JsPlumb, leading alternative to GoJS, JointJS and ReactFlow

Hierarchy Layout

CAD Drawing tools demonstration - JsPlumb - When you've reached the limit with ReactFlow, we can help!

Connector Editors

Force directed layout demonstration, org chart layout demonstration - JsPlumb, flowcharts, chatbots, bar charts, decision trees, mindmaps, org charts, gantt charts and more

Layouts

Collapsible hierarchy Italic language family demonstration - JsPlumb, leading alternative to GoJS, JointJS and ReactFlow

Collapsible Hierarchy

Nested instances desktop example - JsPlumb, leading alternative to GoJS, JointJS and ReactFlow

Nested Instances