API Reference

Theme

Theme is the shape of defaultTheme, exported by @univerjs/themes and @univerjs/presets. Start with a complete theme and override the tokens you need:

TypeScript
import type { Theme } from '@univerjs/themes'import { Univer } from '@univerjs/core'import { defaultTheme } from '@univerjs/themes'const theme: Theme = {  ...defaultTheme,  primary: {    ...defaultTheme.primary,    600: '#2563eb',  },}const univer = new Univer({ theme })

The theme includes color scales, semantic tokens, and component-specific values. Preserve the other keys when changing one group. For runtime switching, use univerAPI.setTheme(); plugin implementations should read the active theme through ThemeService.

How is this guide?

© 2026 DreamNum Co., Ltd.