# RibbonOptions Interface

> RibbonOptions interface in the TX Sheet Control TypeScript API for the browser, with its syntax and a TypeScript example.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Interface
- **Path:** TX Sheet Control > API Reference > TypeScript API > Browser Editor > RibbonOptions Interface
- **751 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonoptions/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonoptions/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonoptions/llms-full.txt

---

Initial ribbon presentation and item policies are passed as `SpreadsheetOptions.ribbon`. The same shape supplies partial runtime patches to `ui.ribbon.configure`.

Type-only browser declaration from `@txtextcontrol/tx-sheet-control`; it is not a runtime constructor.

### Syntax

```typescript
interface RibbonOptions {
    layout?: RibbonLayoutMode;
    displayMode?: RibbonDisplayMode;
    tabs?: Record<string, RibbonItemOptions>;
    groups?: Record<string, RibbonItemOptions>;
    buttons?: Record<string, RibbonItemOptions>;
}
```

### Members

| Member | Description |
|---|---|
| [layout](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonoptions/layout-property/llms-full.txt) | Initial command density, defaulting to `classic`. Omit from a patch to retain the current density. |
| [displayMode](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonoptions/displaymode-property/llms-full.txt) | Initial command display, defaulting to `expanded`. Tabs-only retains the chosen density. |
| [tabs](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonoptions/tabs-property/llms-full.txt) | Policies keyed by tab IDs such as `reporting`. A disabled tab cannot become active through contextual selection. |
| [groups](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonoptions/groups-property/llms-full.txt) | Policies keyed by scoped group IDs such as `home.clipboard`. False parent policies apply to descendants. |
| [buttons](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonoptions/buttons-property/llms-full.txt) | Policies keyed by scoped control IDs such as `home.font.bold`. Controls include buttons, selectors and inputs. |

### Examples

Use a mounted editor to configure the commands available for editing a report.

```typescript
import { Spreadsheet } from '@txtextcontrol/tx-sheet-control';

function configureEditor(host: HTMLElement) {
    const editor = new Spreadsheet(host, {
        license: 'YOUR_SIGNED_LICENSE',
        height: 600,
        fontCatalogURL: '/assets/sheet/fonts/catalog.json',
    });
    editor.ui.ribbon.configure({
        layout: 'compact',
        displayMode: 'expanded',
        tabs: { reporting: { enabled: false } },
        groups: { 'home.clipboard': { enabled: false } },
        buttons: { 'home.font.bold': { enabled: false } },
    });
    return editor;
}
```

### Remarks

Settings belong to the editor, survive workbook loads and are excluded from workbook serialization. Item policies customize screen commands; they do not restrict workbook API calls or keyboard editing. Use worksheet protection for document editing rules.

### See Also

- [Ribbon Guide](https://docs.textcontrol.com/tx-sheet-control/spreadsheet-editor/ribbon/llms-full.txt)

Replace `YOUR_SIGNED_LICENSE` with your issued Trial, Developer or OEM token before running the editor example.

---

## In This Section

- [RibbonOptions.buttons Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonoptions/buttons-property/llms-full.txt): RibbonOptions.buttons property in the TX Sheet Control TypeScript API for the browser, with its type Record<string, RibbonItemOptions> and a TypeScript example.
- [RibbonOptions.displayMode Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonoptions/displaymode-property/llms-full.txt): RibbonOptions.displayMode property in the TX Sheet Control TypeScript API for the browser, with its type RibbonDisplayMode and a TypeScript example.
- [RibbonOptions.groups Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonoptions/groups-property/llms-full.txt): RibbonOptions.groups property in the TX Sheet Control TypeScript API for the browser, with its type Record<string, RibbonItemOptions> and a TypeScript example.
- [RibbonOptions.layout Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonoptions/layout-property/llms-full.txt): RibbonOptions.layout property in the TX Sheet Control TypeScript API for the browser, with its type RibbonLayoutMode and a TypeScript example.
- [RibbonOptions.tabs Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonoptions/tabs-property/llms-full.txt): RibbonOptions.tabs property in the TX Sheet Control TypeScript API for the browser, with its type Record<string, RibbonItemOptions> and a TypeScript example.

---

## Nearby

- **Previous:** [RibbonApi.reset Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonapi/reset-method/llms-full.txt)
- **Next:** [RibbonOptions.layout Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonoptions/layout-property/llms-full.txt)
