Installation & Basic Usage

This page describes how to install Univer Slides and render an editor on the page. The examples use the Web SDK Slides packages. Univer does not provide a Slides preset yet, so the application is assembled in plugin mode.

If you are unfamiliar with Univer's core concepts, read Quickstart first.

Univer provides two integration modes: Preset Mode and Plugin Mode. Preset Mode supplies preconfigured plugin bundles, which removes most of the assembly work. Applications that need deep customization or extensions use Plugin Mode, in which each plugin is selected and configured individually.

Setting up via plugin mode

Univer distributes Slides as a set of plugins. A browser editor typically registers the shared Univer runtime, the license plugin, the Docs and Drawing dependencies, and then the Slides model and UI plugins.

Using package manager

The build tool must support ES Modules and the exports field in package.json.

Installation

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

All @univerjs/* and @univerjs-pro/* packages must stay on the same version.

Shell
pnpm add @univerjs/core @univerjs/design @univerjs/docs @univerjs/docs-ui @univerjs/drawing @univerjs/engine-render @univerjs/ui @univerjs-pro/license @univerjs-pro/slides @univerjs-pro/slides-ui

Usage

Create the container and give it an explicit height before initializing Univer:

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

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

Caution

  • Register UniverLicensePlugin before any Slides plugin.
  • Import the shared UI CSS before the product UI CSS.
  • Add optional packages such as print, tables, charts, and import/export only when the product requires them.
  • UniverSlidesUIPlugin loads UniverProFormulaEnginePlugin on its own for shapes. If the same Univer instance also registers UniverFormulaEnginePlugin, install @univerjs-pro/engine-formula and replace the import and registration of that engine with UniverProFormulaEnginePlugin in the initialization code. Do not register both formula engines.
  1. Import the stylesheets, locale packs, and required plugins:

    TypeScript
    import { UniverLicensePlugin } from '@univerjs-pro/license'import { UniverSlidesPlugin } from '@univerjs-pro/slides'import { UniverSlidesUIPlugin } from '@univerjs-pro/slides-ui'import SlidesUIEnUS from '@univerjs-pro/slides-ui/locale/en-US'import SlidesEnUS from '@univerjs-pro/slides/locale/en-US'import { LocaleType, mergeLocales, Univer, UniverInstanceType } from '@univerjs/core'import DesignEnUS from '@univerjs/design/locale/en-US'import { UniverDocsPlugin } from '@univerjs/docs'import { UniverDocsUIPlugin } from '@univerjs/docs-ui'import DocsUIEnUS from '@univerjs/docs-ui/locale/en-US'import { UniverDrawingPlugin } from '@univerjs/drawing'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/docs-ui/lib/index.css'import '@univerjs-pro/slides-ui/lib/index.css'
  2. To use the Facade API2, import the facade entries as well:

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

    TypeScript
    const univer = new Univer({  locale: LocaleType.EN_US,  locales: {    [LocaleType.EN_US]: mergeLocales(      DesignEnUS,      UIEnUS,      DocsUIEnUS,      SlidesEnUS,      SlidesUIEnUS,    ),  },})univer.registerPlugin(UniverRenderEnginePlugin)univer.registerPlugin(UniverUIPlugin, {  container: 'app',})univer.registerPlugin(UniverDocsPlugin)univer.registerPlugin(UniverDocsUIPlugin)univer.registerPlugin(UniverDrawingPlugin)univer.registerPlugin(UniverLicensePlugin, {  license: process.env.CLIENT_LICENSE_TEXT,})univer.registerPlugin(UniverSlidesPlugin)univer.registerPlugin(UniverSlidesUIPlugin)univer.createUnit(UniverInstanceType.UNIVER_SLIDE, {})const univerAPI = FUniver.newAPI(univer)

The univerAPI object that FUniver.newAPI(univer) returns is Univer's Facade API. The application uses it to create presentations and to call Slides APIs.

Plugin configuration

UniverUIPlugin

  • container
    string | HTMLElement
    Mount element or its DOM ID.

UniverLicensePlugin

  • license
    string
    Client license file contents.

univer.registerPlugin and univer.registerPlugins methods

Call univer.registerPlugin after creating the Univer instance to register a single plugin.

The signature is univer.registerPlugin(Plugin, options). Plugin is the plugin class, and options holds the configuration of that plugin.

univer.registerPlugins accepts an array and registers several plugins in one call. This form is convenient when the plugin list should be maintained in one place.

TypeScript
univer.registerPlugins([  UniverRenderEnginePlugin,  [UniverUIPlugin, {    container: 'app',  }],  UniverDocsPlugin,  UniverDocsUIPlugin,  UniverDrawingPlugin,  [UniverLicensePlugin, {    license: process.env.CLIENT_LICENSE_TEXT,  }],  UniverSlidesPlugin,  UniverSlidesUIPlugin,])

Optional feature packages

Install a feature package when the editor needs the corresponding capability:

Shell
pnpm add @univerjs-pro/slides-printpnpm add @univerjs-pro/slides-table @univerjs-pro/slides-table-uipnpm add @univerjs-pro/chart-ui @univerjs-pro/slides-chart @univerjs-pro/slides-chart-uipnpm add @univerjs-pro/slides-exchange-client

Registration examples are given in Printing, Table, Charts, and Import and export.

Lazy-load optional plugins

Plugin mode also allows a feature plugin to be loaded only when the product needs it:

TypeScript
univer.createUnit(UniverInstanceType.UNIVER_SLIDE, {})import('@univerjs-pro/slides-chart').then(({ UniverSlidesChartPlugin }) => {  univer.registerPlugin(UniverSlidesChartPlugin)})

Server-side usage

In Node.js, register the model plugins and omit the browser UI plugins:

TypeScript
univer.registerPlugin(UniverSlidesPlugin)

The model plugin performs headless snapshot processing. Exposing collaboration or file-conversion APIs requires the corresponding Server SDK modules. Registering this plugin alone does not create those services.

Mobile support

These examples require SDK packages that export the mobile plugins listed below. All @univerjs/* and @univerjs-pro/* dependencies must remain on the same version.

1.0.0-rc.0 does not export UniverSlidesMobileUIPlugin. Choose a build that includes this mobile entry before following the example.

Touch controls in Univer Slides require mobile UI plugins.3 Decide the UI mode before creating the editor.

In the plugin-mode example above, replace the UI imports and registrations with those below before createUnit(). Do not append them to a desktop editor that has already been initialized. Keep the model plugins, engines, locale files, CSS, and Facade imports. Desktop and mobile classes are named exports from the same package entry.

UniverMobileUIPlugin

  • container
    string | HTMLElement
    Mount element or its DOM ID.
  • disableAutoFocus
    trueDefault: true
    Prevents the editor from taking focus at startup.
TypeScript
import { UniverSlidesMobileUIPlugin } from '@univerjs-pro/slides-ui'import { UniverDocsMobileUIPlugin } from '@univerjs/docs-ui'import { UniverMobileUIPlugin } from '@univerjs/ui'univer.registerPlugin(UniverMobileUIPlugin, { container: 'app' })univer.registerPlugin(UniverDocsMobileUIPlugin)univer.registerPlugin(UniverSlidesMobileUIPlugin)

Plugin mapping

Register only the features in use, and keep their model plugins and required dependencies. A mobile UI export does not mean that desktop and mobile offer the same controls. Pro features still require the appropriate license. Features with a backend require application-side integration with the Univer Server SDK.

PackageDesktop registrationMobile registration
@univerjs/uiUniverUIPluginUniverMobileUIPlugin
@univerjs/docs-uiUniverDocsUIPluginUniverDocsMobileUIPlugin
@univerjs-pro/slides-uiUniverSlidesUIPluginUniverSlidesMobileUIPlugin
@univerjs/drawing-uiUniverDrawingUIPluginUniverDrawingMobileUIPlugin
@univerjs/thread-comment-uiUniverThreadCommentUIPluginUniverThreadCommentMobileUIPlugin
@univerjs-pro/shape-editor-uiUniverShapeEditorUIPluginUniverShapeEditorMobileUIPlugin
@univerjs-pro/chart-uiUniverChartUIPluginUniverChartMobileUIPlugin
@univerjs-pro/exchange-clientUniverExchangeClientPluginUniverExchangeClientMobileUIPlugin
@univerjs-pro/slides-chart-uiUniverSlidesChartUIPluginUniverSlidesChartMobileUIPlugin
@univerjs-pro/slides-printUniverSlidesPrintPluginUniverSlidesPrintMobilePlugin
@univerjs-pro/slides-table-uiUniverSlidesTableUIPluginUniverSlidesTableMobileUIPlugin
@univerjs-pro/slides-thread-comment-uiUniverSlidesThreadCommentUIPluginUniverSlidesThreadCommentMobileUIPlugin

Container and touch interaction

The container needs an explicit height, and the page viewport must be configured. 100dvh follows the dynamic viewport height. Test scrolling, pinch zoom, text selection, clipboard access, and the on-screen keyboard in the targeted mobile browsers. Resizing a desktop editor does not switch it to mobile plugins.

UniverMobileUIPlugin defaults to disableAutoFocus: true, so the editor does not take focus automatically during initialization.

HTML
<meta name="viewport" content="width=device-width, initial-scale=1" /><div id="app" style="height: 100dvh"></div>

Other releases

Univer publishes alpha / beta channels alongside its stable releases. They make new features available before their official release, at the cost of higher risk. These versions may contain bugs, incomplete functionality, or unstable features, so they should be avoided in production where possible.

Alpha / beta release

When the Univer team completes a new feature or a significant change, it may pre-release the work to the alpha or beta channel. Install the alpha / beta version of a Univer package as follows:

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

Report problems and feedback on an alpha / beta version 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. ↩

  3. A mobile UI plugin selects touch controls and mobile services during initialization. It does not automatically detect the device or switch an existing instance when the window is resized. To change modes, preserve the document state, dispose of the old instance and initialize the chosen plugin set. ↩

How is this guide?

© 2026 DreamNum Co., Ltd.