# RibbonApi Interface

> RibbonApi interface in the browser TypeScript API: Editor-owned ribbon controller for density, display mode and item policies, from editor.ui.ribbon.

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

---

The editor-owned ribbon controller changes command density, display mode and built-in item policies. Obtain it from `editor.ui.ribbon`.

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

### Syntax

```typescript
interface RibbonApi {
    visible: boolean;
    layout: RibbonLayoutMode;
    displayMode: RibbonDisplayMode;
    readonly items: RibbonItem[];
    configure(options: RibbonOptions): void;
    reset(): void;
}
```

### Members

| Member | Description |
|---|---|
| [visible](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonapi/visible-property/llms-full.txt) | Whole-ribbon visibility, shared with `editor.ui.areas.ribbon`. Hiding the ribbon retains its item policies. |
| [layout](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonapi/layout-property/llms-full.txt) | Command density: `classic` (default) or `compact`. Compact keeps a curated command row with complete groups in overflow. |
| [displayMode](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonapi/displaymode-property/llms-full.txt) | Command display: `expanded` (default) or `tabs-only`. Tab selection in tabs-only opens a temporary panel. |
| [items](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonapi/items-property/llms-full.txt) | A readonly property returning detached catalog entries. Includes contextual commands; context-specific gallery choices can appear when created. |
| [configure](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonapi/configure-method/llms-full.txt) | Atomically validates and merges a partial patch. Omitted settings are preserved. Unknown or wrong-kind IDs throw `RangeError`; invalid values throw `TypeError`. |
| [reset](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonapi/reset-method/llms-full.txt) | Clears every item policy and restores classic, expanded presentation. Whole-ribbon visibility is preserved. |

### 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.visible = 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

- [RibbonApi.configure Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonapi/configure-method/llms-full.txt): RibbonApi.configure method in the TX Sheet Control TypeScript API for the browser, with its syntax and a TypeScript example.
- [RibbonApi.displayMode Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonapi/displaymode-property/llms-full.txt): RibbonApi.displayMode property in the TX Sheet Control TypeScript API for the browser, with its type RibbonDisplayMode and a TypeScript example.
- [RibbonApi.items Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonapi/items-property/llms-full.txt): RibbonApi.items property in the TX Sheet Control TypeScript API for the browser: A readonly property returning detached catalog entries.
- [RibbonApi.layout Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonapi/layout-property/llms-full.txt): RibbonApi.layout property in the TX Sheet Control TypeScript API for the browser, with its type RibbonLayoutMode and a TypeScript example.
- [RibbonApi.reset Method](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonapi/reset-method/llms-full.txt): RibbonApi.reset method in the TX Sheet Control TypeScript API for the browser, with its syntax and a TypeScript example.
- [RibbonApi.visible Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonapi/visible-property/llms-full.txt): RibbonApi.visible property in the TX Sheet Control TypeScript API for the browser, with its type boolean and a TypeScript example.

---

## Nearby

- **Previous:** [barcodeCheckDigit Function](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/barcodecheckdigit-function/llms-full.txt)
- **Next:** [RibbonApi.visible Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/ribbonapi/visible-property/llms-full.txt)
