Slide Data Structure

ISlideData

ISlideData is the persisted snapshot for one Univer Slides presentation. It stores presentation metadata, the ordered slide collection, optional master and layout layers, transitions, themes, and resources.

Required properties

PropertyTypeDescription
idstringUnique ID of the presentation unit.
namestringDisplay name of the presentation.
defaultPageSizeISlidePageSizeDefault width and height used when a page has no own size.
slideOrderstring[]Slide IDs in presentation order.
slidesRecord<string, ISlidePage>Normal slide pages keyed by slide ID.

Optional properties

PropertyTypeDescription
rev?numberSnapshot revision.
appVersion?stringUniver version that produced the snapshot.
locale?LocaleTypePresentation locale.
masterPageOrder?string[]Master page IDs in stored order.
masterPages?Record<string, ISlideMasterPage>Master pages keyed by ID.
layoutPageOrder?string[]Layout page IDs in stored order.
layoutPages?Record<string, ISlideLayoutPage>Layout pages keyed by ID.
handoutMasterPageOrder?string[]Handout master IDs in stored order.
handoutMasterPages?Record<string, ISlideHandoutMasterPage>Handout masters keyed by ID.
notesMasterPageOrder?string[]Notes master IDs in stored order.
notesMasterPages?Record<string, ISlideNotesMasterPage>Notes masters keyed by ID.
activeSlideId?stringID of the active slide.
transitionRecords?Record<string, ISlideTransition>Reusable transition records keyed by transition ID.
slideTransitionRefs?Record<string, string>Mapping from slide IDs to transition IDs.
theme?ISlideThemeDataDefault presentation theme.
themes?Record<string, ISlideThemeData>Additional themes keyed by theme ID.
zoomRatio?numberPersisted presentation zoom ratio.
resources?IResourcesResources contributed by Slides and feature plugins.
custom?SlideCustomDataApplication-defined presentation metadata.

Ordered page records

Every ID in slideOrder should resolve to an entry in slides. The optional master, layout, handout-master, and notes-master layers follow the same order-array and keyed-record pattern. activeSlideId, when present, should resolve to an entry in slides.

TypeScript
import type { ISlideData } from '@univerjs-pro/slides'import { PageTypeEnum } from '@univerjs-pro/slides'const slideData: ISlideData = {  id: 'deck-1',  name: 'Product roadmap',  defaultPageSize: { width: 960, height: 540 },  slideOrder: ['slide-1'],  slides: {    'slide-1': {      id: 'slide-1',      name: 'Opening',      pageType: PageTypeEnum.Slide,      elementOrder: [],      elements: {},    },  },  activeSlideId: 'slide-1',}

Usage

Pass a snapshot to univerAPI.createPresentation(slideData) to restore a presentation. Use presentation.save() to obtain the current ISlideData snapshot for persistence, export, print, or server-side processing.

Caution

A snapshot is persistence data, not the live SlideModel. After the presentation starts, use Slides Facade methods or registered commands instead of mutating the snapshot object.

How is this guide?

© 2026 DreamNum Co., Ltd.