UI Overview

@univerjs-pro/boards-ui is the licensed browser canvas for Univer Boards. It renders the scene, handles selection and viewport interactions, and provides the toolbars, context menus, text editing, shape editing, connector editing, and UI for the supported Board element types.

Register the Board UI

Configure UniverLicensePlugin before the Board plugins. Docs, Drawing, Ink, and Shape Editor are technical dependencies for rendering and editing; using Boards does not require prior knowledge of those products.

UniverBoardsUIPlugin

  • workbench
    object
    Workbench layout options.
    • content
      booleanDefault: true
      Shows the main content area.
    • header
      booleanDefault: false
      Shows the header.
    • headerMenu
      booleanDefault: false
      Shows the header menu.
    • toolbar
      booleanDefault: false
      Shows the toolbar.
    • footer
      booleanDefault: false
      Shows the footer.
  • interaction
    object
    Canvas zoom and panning options.
    • minZoomRatio
      numberDefault: 0.02
      Sets the minimum zoom ratio.
    • maxZoomRatio
      numberDefault: 4
      Sets the maximum zoom ratio.
    • wheelZoomWithModifier
      booleanDefault: true
      Enables wheel zoom with a modifier key.
    • trackpadPanEnabled
      booleanDefault: true
      Enables panning with the trackpad.
  • interactionMode
    'editing' | 'viewing'Default: 'editing'
    Starts in editing or viewing mode. Document permissions still apply.
  • gridVisible
    booleanDefault: false
    Shows the canvas grid.
  • grid
    object
    Grid colors and spacing.
    • gridSize
      numberDefault: 32
      Minor grid spacing in canvas units.
    • lineColor
      stringDefault: 'rgba(100, 116, 139, 0.48)'
      Color of minor grid lines.
    • majorGridSize
      numberDefault: 160
      Major grid spacing in canvas units.
    • majorLineColor
      stringDefault: 'rgba(100, 116, 139, 0.72)'
      Color of major grid lines.
  • quickAddEnabled
    booleanDefault: true
    Shows the quick-add controls.
  • preciseSelection
    booleanDefault: false
    Requires more precise hits to select elements.
  • showDimensions
    booleanDefault: false
    Shows dimension indicators.
  • showToolbar
    booleanDefault: true
    Shows the canvas toolbar.
  • modeSwitcherVisible
    booleanDefault: true
    Shows the interaction-mode switcher.
  • collaboratorCursorsVisible
    booleanDefault: true
    Shows other collaborators’ cursors.
  • collaboratorCursorShareInterval
    numberDefault: 100
    Interval between shared cursor samples in milliseconds. The supported range is 16–1000.
  • viewportBar
    object
    Viewport scrollbar settings.
    • enabled
      booleanDefault: true
      Enables the viewport scrollbars.
    • horizontal
      booleanDefault: true
      Shows the horizontal scrollbar.
    • vertical
      booleanDefault: true
      Shows the vertical scrollbar.
    • padding
      number | objectDefault: 300
      Padding around the canvas, in canvas units. Use one number or a value per side.
      • top
        numberDefault: 300
        Padding at the top.
      • right
        numberDefault: 300
        Padding on the right.
      • bottom
        numberDefault: 300
        Padding at the bottom.
      • left
        numberDefault: 300
        Padding on the left.
  • insert
    object
    New element defaults.
    • chart
      object
      Chart size.
      • width
        numberDefault: 480
        Width.
      • height
        numberDefault: 270
        Height.
    • image
      object
      Image size and placement.
      • fallbackWidth
        numberDefault: 320
        Width used when the image dimensions are unknown.
      • fallbackHeight
        numberDefault: 180
        Height used when the image dimensions are unknown.
      • fitRatio
        numberDefault: 0.56
        Fraction of the visible area used to fit the image.
      • minEdge
        numberDefault: 80
        Minimum fitted edge length.
      • minPositionOffset
        numberDefault: 24
        Minimum offset from the viewport origin.
    • table
      object
      Table dimensions.
  • shape
    object
    Shape picker.
    • commonCount
      number
      Number of common shapes to display.
    • presets
      readonly IBoardShapePreset[]
      Shape definitions in the picker.
  • sticky
    object
    Sticky-note options.
    • colors
      readonly string[]
      Available colors.
  • renderAdapters
    readonly IBoardElementRenderAdapter[]
    Replaces the default render adapters.
  • additionalRenderAdapters
    readonly IBoardElementRenderAdapter[]
    Adds render adapters to the configured set.

UniverLicensePlugin

  • license
    string
    Client license file contents.
TypeScript
univer.registerPlugin(UniverLicensePlugin, {  license: process.env.CLIENT_LICENSE_TEXT,})univer.registerPlugin(UniverBoardsPlugin)univer.registerPlugin(UniverBoardsUIPlugin, {  workbench: {    content: true,    header: false,    headerMenu: false,    toolbar: false,    footer: false,  },  interaction: {    minZoomRatio: 0.1,    maxZoomRatio: 4,    wheelZoomWithModifier: true,    trackpadPanEnabled: true,  },})

For the full dependency, style, and locale registration order, see Installation & Basic Usage.

Canvas options

IUniverBoardsUIConfig also controls grid appearance, insert defaults, available shapes and sticky-note colors, toolbar tools, viewport bars, render adapters, and options such as quick add, precise selection, dimensions, and collaborator cursors.

Configure context menus and canvas tools at startup. To change an existing context menu, use the menu Facade API.

How is this guide?

© 2026 DreamNum Co., Ltd.