# @univerjs/docs-toc-ui

- Human documentation: [https://docs.univer.ai/reference/packages/plugins/univerjs/docs-toc-ui](https://docs.univer.ai/reference/packages/plugins/univerjs/docs-toc-ui)

- Agent Markdown: [https://docs.univer.ai/reference/packages/plugins/univerjs/docs-toc-ui.md](https://docs.univer.ai/reference/packages/plugins/univerjs/docs-toc-ui.md)

- Requested language: `en-US`

- Content language: `en-US`

- Documentation version: `1.0.0`

- Source: [packages/plugins/univerjs/docs-toc-ui.mdx](https://github.com/dream-num/documentation/blob/dev/content/reference/packages/plugins/univerjs/docs-toc-ui.mdx)

---

Ribbon controls, context menus, configuration dialog, and active-range highlighting for a document table of contents.

```ts
import { UniverDocsTocPlugin } from '@univerjs/docs-toc'
import { UniverDocsTocUIPlugin } from '@univerjs/docs-toc-ui'
import DocsTocUIEnUS from '@univerjs/docs-toc-ui/locale/en-US'
import { LocaleType } from '@univerjs/core'

import '@univerjs/docs-toc-ui/lib/index.css'

univerAPI.loadLocales(LocaleType.EN_US, DocsTocUIEnUS)

univer.registerPlugin(UniverDocsTocPlugin)
univer.registerPlugin(UniverDocsTocUIPlugin)
```

Merge `DocsTocUIEnUS` into the application's `locales` configuration before opening a document. This package requires Docs, Docs UI, and the render engine. It accepts `menu?: MenuConfig` and exports `DocsTocUIMenuSchema` for menu customization. It has no Facade entry.

The current Docs core and advanced presets do not include these plugins; register both explicitly. See the [table-of-contents guide](https://docs.univer.ai/guides/docs/features/table-of-contents.md).
