Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

2.1 KB
Raw Blame

@univerjs/sheets-conditional-formatting

npm version license downloads

@univerjs/sheets-conditional-formatting adds the core conditional formatting model, commands, and calculation support for Univer Sheets.

Package Overview

Package UMD global CSS Locales Facade entry Worker entry
@univerjs/sheets-conditional-formatting UniverSheetsConditionalFormatting No Yes Yes No

Installation

pnpm add @univerjs/sheets-conditional-formatting
# or
npm install @univerjs/sheets-conditional-formatting

Usage

Start with the integration setup for your document type, including its required plugins, styles, and locale resources. The snippet below assumes that setup is complete.

import { LocaleType, mergeLocales, Univer } from '@univerjs/core';
import { UniverSheetsConditionalFormattingPlugin } from '@univerjs/sheets-conditional-formatting';
import EnUS from '@univerjs/sheets-conditional-formatting/locale/en-US';

const univer = new Univer({
    locale: LocaleType.EN_US,
    locales: {
        [LocaleType.EN_US]: mergeLocales(EnUS),
    },
});

univer.registerPlugin(UniverSheetsConditionalFormattingPlugin);

Integration Notes

Use this package with @univerjs/sheets-conditional-formatting-ui when users need menus and rule-management panels.

  • Import @univerjs/sheets-conditional-formatting/facade when using this package through Univer Facade APIs.

Resources