# UI options

Source: https://mroffice.ai/en/developers/embed/ui-options

How the embedded editor looks: language, light or dark theme, the ribbon or a clean surface, the MR Office mark, and how big it is.

## Options

Pass these to MROffice.open() (or open() from mroffice-embed). What the person may do (edit or view) is never a UI option: it is the session token's mode.

| Option | Values | Default |
| --- | --- | --- |
| locale | en, de, fr, es, ja, ko, zh, zh-TW and the site's other languages | en |
| theme | "light", "dark" or "system" (follows the person's OS); change it later with setTheme() | "light" |
| ui.toolbar | "full" (the Office-style ribbon) or "none" (a clean editing surface) | "full" |
| ui.brand | false hides the small MR Office mark, once MR Office has allowed it for your app (the console shows whether it has) | true |

## Size and layout

The editor fills its container: give the container a height (80vh, or the space left under your own header). It follows the container's size as it changes, so a resizable panel or a full-screen toggle needs no call.

```html
<div id="editor" style="height: calc(100vh - 64px)"></div>
```

## Edit or view

Mint the token with mode "view" for a read-only editor. To switch a person between view and edit without reloading, call setMode(mode, token) with a token signed for the new mode.

```js
await editor.setMode("edit", await fetchToken({ mode: "edit" }));
editor.setTheme("dark");
```
