Installation & Basic Usage

This page describes how to install Univer Bases and how to run it after installation. Bases is distributed as a Univer Office SDK product and currently uses plugin mode.

If the core concepts of Univer are unfamiliar, read Quickstart first.

Univer supports two integration modes: Preset Mode and Plugin Mode. Preset Mode precombines plugins and reduces configuration work. If you need deep customization or extensions, use Plugin Mode so that you can select and configure plugins individually.

Setting up via plugin mode

A browser Bases application typically registers the shared Univer runtime, the render engine, the UI shell, the formula engine, and the license first, then the Bases model and UI plugins.

Using package manager

Use a build tool that supports ES modules and the exports field in package.json.

Installation

Univer builds its UI with React and uses RxJS for data streams, and it can also be embedded in Vue or Angular applications. Ensure that the react, react-dom, and rxjs peer dependencies1 are installed. The Yarn command below adds them explicitly.

Keep every @univerjs/* and @univerjs-pro/* package on the same version.

Shell
pnpm add @univerjs/core @univerjs/design @univerjs/engine-render @univerjs/ui @univerjs-pro/bases @univerjs-pro/bases-ui @univerjs-pro/engine-formula @univerjs-pro/license

Usage

Create the container with an explicit height before initializing Univer:

HTML
<div id="app" style="height: 600px"></div>

Import the facade entries used below before calling FUniver.newAPI(univer). Load the @univerjs/design CSS first, then the @univerjs/ui CSS, and the product CSS last.

Caution

  • Register UniverLicensePlugin before the Bases plugins.
  • Import shared UI CSS before product UI CSS.
  • Use UniverProFormulaEnginePlugin from @univerjs-pro/engine-formula for Bases, including dashboard shapes. If you combine products in one Univer instance, replace any UniverFormulaEnginePlugin import and registration instead of registering both formula engines.
  1. Import styles, locale packs, and the plugins you need:

    TypeScript
    import { UniverBasesPlugin } from '@univerjs-pro/bases'import { UniverBasesUIPlugin } from '@univerjs-pro/bases-ui'import BasesUIEnUS from '@univerjs-pro/bases-ui/locale/en-US'import BasesEnUS from '@univerjs-pro/bases/locale/en-US'import { UniverProFormulaEnginePlugin } from '@univerjs-pro/engine-formula'import { UniverLicensePlugin } from '@univerjs-pro/license'import { LocaleType, mergeLocales, Univer, UniverInstanceType } from '@univerjs/core'import DesignEnUS from '@univerjs/design/locale/en-US'import { UniverRenderEnginePlugin } from '@univerjs/engine-render'import { UniverUIPlugin } from '@univerjs/ui'import UIEnUS from '@univerjs/ui/locale/en-US'import '@univerjs/design/lib/index.css'import '@univerjs/ui/lib/index.css'import '@univerjs-pro/bases-ui/lib/index.css'
  2. Import facade entries if you plan to use Facade API2:

    TypeScript
    import { FUniver } from '@univerjs/core/facade'import '@univerjs-pro/bases/facade'import '@univerjs-pro/bases-ui/facade'
  3. Create a Univer instance, register the plugins, and create a Base unit:

    TypeScript
    const univer = new Univer({  locale: LocaleType.EN_US,  locales: {    [LocaleType.EN_US]: mergeLocales(      DesignEnUS,      UIEnUS,      BasesEnUS,      BasesUIEnUS,    ),  },})univer.registerPlugin(UniverRenderEnginePlugin)univer.registerPlugin(UniverUIPlugin, { container: 'app' })univer.registerPlugin(UniverProFormulaEnginePlugin)univer.registerPlugin(UniverLicensePlugin, {  license: process.env.CLIENT_LICENSE_TEXT,})univer.registerPlugin(UniverBasesPlugin)univer.registerPlugin(UniverBasesUIPlugin)univer.createUnit(UniverInstanceType.UNIVER_BASE, {})const univerAPI = FUniver.newAPI(univer)

Plugin configuration

UniverUIPlugin

  • container
    string | HTMLElement
    The DOM element to mount into, or its ID.

UniverLicensePlugin

  • license
    string
    Contents of the client license file.

univer.registerPlugin and univer.registerPlugins methods

univer.registerPlugin registers a plugin on a Univer instance. Call it after creating the instance.

The signature is univer.registerPlugin(Plugin, options). Plugin is the plugin to register, and options is an optional configuration object. Each plugin defines its own options.

univer.registerPlugins takes an array and registers several plugins in one call. Use it to keep plugin registration in one place.

TypeScript
univer.registerPlugins([  UniverRenderEnginePlugin,  [UniverUIPlugin, { container: 'app' }],  UniverProFormulaEnginePlugin,  [UniverLicensePlugin, {    license: process.env.CLIENT_LICENSE_TEXT,  }],  UniverBasesPlugin,  UniverBasesUIPlugin,])

Mobile support

The current @univerjs-pro/bases-ui package does not export a dedicated mobile UI plugin. Neither a MobileUIPlugin import nor a mobile: true option exists, so do not write one. A narrow container does not demonstrate complete touch support; test the existing UI on the target devices.

Other releases

Besides stable releases, Univer publishes alpha and beta channels. These channels allow you to try new features before their official release. New features also carry risk: these builds may contain bugs, incomplete functionality, or unstable features, so avoid them in production where possible.

Alpha / beta release

When the Univer team completes a new feature or a significant change, it may publish a pre-release to the alpha or beta channel. Install an alpha or beta build of a Univer package with these commands:

Shell
pnpm add @univerjs-pro/bases@alpha # Alpha version
pnpm add @univerjs-pro/bases@beta # Beta version

If you encounter a problem or have feedback while using an alpha or beta build, report it to the Univer team through GitHub Issues.

Next steps

Footnotes

  1. peerDependencies declare dependencies that the host application must provide with compatible versions. They let Univer share libraries such as React instead of bundling a separate copy. ↩

  2. Facade is the application-facing API over registered plugins. Importing a Facade entry adds API methods; it does not register the feature plugin itself. ↩

How is this guide?

© 2026 DreamNum Co., Ltd.