Mind Maps

Plugins Info

Board mind-map support is optional. Add it when the product needs mind-map nodes and interactions inside the Board canvas.

Register mind-map support

TypeScript
import { UniverBoardsMindPlugin } from '@univerjs-pro/boards-mind'import { UniverBoardsMindUIPlugin } from '@univerjs-pro/boards-mind-ui'import BoardsMindUIEnUS from '@univerjs-pro/boards-mind-ui/locale/en-US'import '@univerjs-pro/boards-mind/facade'import '@univerjs-pro/boards-mind-ui/lib/index.css'univer.registerPlugin(UniverBoardsMindPlugin)univer.registerPlugin(UniverBoardsMindUIPlugin)

Mobile support

Configure the mobile editor first. In the plugin-mode setup described on this page, replace the desktop registrations below with the mobile exports from the same packages, and do so before opening a document. Keep the model plugins, styles, locales, and Facade imports, and do not register both variants.

PackageDesktop registrationMobile registration
@univerjs-pro/boards-mind-uiUniverBoardsMindUIPluginUniverBoardsMindMobileUIPlugin

Package responsibilities

  • @univerjs-pro/boards-mind integrates mind-map elements with the Board model.
  • @univerjs-pro/boards-mind-ui adds mind-map rendering, editing, and UI interaction. It also provides the @univerjs-pro/boards-mind-ui/locale/* locale files and the @univerjs-pro/boards-mind-ui/lib/index.css stylesheet that browser editors require.

Runtime choices

A browser editor requires both packages. For server-side snapshot processing, register the model package with UniverBoardsPlugin and omit the UI packages.

Register mind-map support before opening a snapshot that contains mind-map elements.

Facade API

Use the structured Facade rather than editing the underlying Board shapes and connectors individually.

TypeScript
const board = univerAPI.getActiveBoard()if (!board) throw new Error('No active Board')const mindMap = board.insertMindMap({  left: 180,  top: 180,  root: {    text: 'Release',    children: [      { text: 'Product', children: [{ text: 'Scope' }, { text: 'UX' }] },      { text: 'Engineering', children: [{ text: 'API' }, { text: 'QA' }] },      { text: 'Launch', children: [{ text: 'Docs' }] },    ],  },})if (!mindMap) throw new Error('Cannot insert mind map')const qa = mindMap.getNodes().find(node => node.getText() === 'QA')qa?.addChild({ text: 'Automation' })

FBoard provides insertMindMap, getMindMap, and getMindMaps. FBoardMindMap provides node lookup, descendants, layout, bounds, reflow, setLayout, setBranchLineType, and remove. Node handles support text, child and sibling insertion, reparenting, promotion, detaching, ordering, styling, and collapse state.

Reflow into bounds

reflow() atomically lays out and centers a mind map inside a rectangle specified in Board coordinates. It preserves node and text sizes. By default the call retries with the smallest supported gaps. If the layout still does not fit or remain readable, the Board remains unchanged and the call returns reason: 'bounds-too-small' with requiredBounds.

TypeScript
const result = mindMap.reflow({  bounds: { left: 80, top: 80, width: 1_000, height: 600 },  padding: 24,})if (!result.success) {  console.warn(result.reason, result.requiredBounds)}

The target rectangle determines only where the mind map is placed. Reflow does not reparent, clip, or resize the mind-map container, and a successful reflow becomes a single undo item.

How is this guide?

© 2026 DreamNum Co., Ltd.