> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reducto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Choose a layer

There are four layers. Each one is built on the one below it. Start at the top and go down only when you need more control.

| Layer | Package | You get | You build |
| - | - | - | - |
| **Editor, batteries included** | `@reductoai/docx-editor` | Toolbar, ruler, pages, caret, review margin, find, dialogs, styles | Nothing. One mount call |
| **Editor, custom chrome** | `@reductoai/docx-editor` (slots, React props) | The same editor; you replace the toolbar or panels | Your toolbar or panels |
| **Headless editor** | `@reductoai/docx-editor/model` | `EditorModel`: caret, selection, input, undo, commands, painting of pages | All the chrome |
| **Canvas viewer** | `@reductoai/docx/browser` + `@reductoai/viewer` | Layout IR and functions that paint it | Read-only display, scroll, zoom |

## Which one?

* **"Users must edit documents in our app."** Use the [editor](https://docs.reducto.ai/office/docx/ui/editor.md). To remove or add a few controls, use [`toolbarItems`](https://docs.reducto.ai/office/docx/ui/editor#change-the-format-bar). Replace the toolbar if it must match your design system.
* **"Our app has its own UI kit and its own toolbar."** Use the editor with slots. [Build your own skin](https://docs.reducto.ai/office/docx/ui/custom-skin.md) shows how. Use the [headless model](https://docs.reducto.ai/office/docx/ui/headless-editor.md) if you replace most regions.
* **"We show documents. Users do not edit them."** Use the [canvas viewer](https://docs.reducto.ai/office/docx/ui/canvas-viewer.md). It is smaller and has no caret.
* **"We need thumbnails or previews."** Use the [canvas viewer](https://docs.reducto.ai/office/docx/ui/canvas-viewer.md) functions, or [PNG export](https://docs.reducto.ai/office/docx/conversion/png.md).

## How the pieces fit

```text theme={null}
 .docx bytes
     │  parse + layout  (@reductoai/docx/browser, in a worker)
     ▼
 LayoutDocument (the IR: pages → lines → runs, boxes, images, fonts)
     │  paint            (@reductoai/viewer: canvas + text layer)
     ▼
 pages on screen ──► EditorModel (caret, selection, commands)  ──► DocxEditor chrome
```

The PDF writer and the PNG export paint the same IR, so what you see in the page is what you get in the export.
