Core Features
The Univer Boards core combines a page-and-element model with an interactive canvas that runs in the browser. Two Web SDK packages deliver the model and the UI, and together they form an independent UNIVER_BOARD unit.
Features
- Pages and element ordering: Pages are stored in
pages, and drawable objects are stored in theelementsof each page; both levels maintain an explicit order array. - Canvas elements: Elements can be text, shapes, images, connectors, groups, containers, and swimlanes.
- Command-driven editing: Element changes, ordering, and parent-child relationships all pass through one command layer, which also carries permissions and hooks for optional history and collaboration integrations.
- Browser canvas: The canvas renders elements and provides selection, transforms, clipboard, text editing, viewport controls, and panels.
- Extensible adapters: Board capabilities such as tables, mind maps, charts, resources, print, and exchange are optional and are integrated as adapters.
- Persistence: A board can be created, restored, and saved as an
IBoardDatasnapshot, which includes pages, resources, themes, and active-page state.
Plugin mode
Installation
Add the two Boards packages to the Univer runtime set up in Installation & Basic Usage:
pnpm add @univerjs-pro/boards @univerjs-pro/boards-uinpm install @univerjs-pro/boards @univerjs-pro/boards-uiyarn add @univerjs-pro/boards @univerjs-pro/boards-uibun add @univerjs-pro/boards @univerjs-pro/boards-uiProduct plugin registration
Register the shared render, document, drawing, ink, shape-editing, and license dependencies first, as described in the installation guide, then register the Boards plugins:
import { UniverBoardsPlugin } from '@univerjs-pro/boards'import { UniverBoardsUIPlugin } from '@univerjs-pro/boards-ui'import '@univerjs-pro/boards-ui/lib/index.css'univer.registerPlugin(UniverBoardsPlugin)univer.registerPlugin(UniverBoardsUIPlugin)UniverBoardsPlugin registers the Board model, commands, element services, adapters, and permissions. UniverBoardsUIPlugin provides the rendered canvas and browser interactions.
Plugin configuration
UniverBoardsUIPlugin
toolbarobjectShow the toolbar.toolsPartial<Record<BoardToolType, boolean | object>>Enable or hide individual canvas tools.[tool]boolean | objectTool override. Use a boolean for a single flag or an object withenabled.enabledbooleanEnables this tool.
Menu configuration and the canvas toolbar
UniverUIPlugin
containerstring | HTMLElementMount element or its DOM ID.
Boards context menus use the shared MenuConfig. Add menu to the existing UniverUIPlugin registration rather than to UniverBoardsUIPlugin. The following example moves Duplicate to the beginning of its context-menu group:
import type { MenuConfig } from '@univerjs/ui'import { UniverUIPlugin } from '@univerjs/ui'const menu: MenuConfig = { 'board.menu.duplicate-selection': { order: -1 },}univer.registerPlugin(UniverUIPlugin, { container: 'app', menu })order sorts sibling context-menu items in ascending order and does not move an item between groups. Use the menu item ID from the product menu definition, which may differ from the command ID.
Canvas toolbar
Boards uses a dedicated canvas toolbar and does not register a standard product Ribbon. gridLayout controls only the shared grid Ribbon; it does not rearrange the canvas toolbar or the context menus. Canvas tools are configured through UniverBoardsUIPlugin.toolbar.tools. The following example disables the pen tool in the existing plugin registration:
import { UniverBoardsUIPlugin } from '@univerjs-pro/boards-ui'univer.registerPlugin(UniverBoardsUIPlugin, { toolbar: { tools: { pen: false } },})toolbar.tools controls whether a tool is available, not its order or grid placement. See the Boards UI reference for the difference between canvas controls and shared menus.
Preset mode
Univer Boards does not provide a dedicated preset at present. Use plugin mode for both the model and the browser UI.
Update menus with the Facade API
Runtime updates
Import @univerjs/ui/facade before creating univerAPI with FUniver.newAPI(univer). updateMenuConfig() merges the changes, preserves unspecified fields, and refreshes the menus. The overrides also apply to menus registered later.
import '@univerjs/ui/facade'univerAPI.updateMenuConfig({ 'board.menu.duplicate-selection': { order: 5 },})How is this guide?