UI Customization
Set the viewer's inspectorInitiallyOpen option to false to start with the property inspector closed. The panel toggle and ribbon group launchers can still open it. Omit the option to preserve the binding's desktop/mobile default; later changes to this initial option do not reset the user's panel state.
Hide individual no-selection inspector cards with the shared customization:
const customization: ViewerCustomization = {
inspector: { hiddenCards: ['presentation', 'theme', 'themeOverride', 'slideSize'] },
};Card ids are presentation, theme, themeOverride, slideSize, slideTransition, notesHandout, document, tags, slide, slideBackground and templateBackground. Each id hides that card wherever the binding provides it. updateCustomization({ inspector: { hiddenCards: [] } }) restores the cards live. Card visibility is scoped to each viewer, independently of inspector opening and closing.
The Properties tab is a Format pane of collapsible sections chosen for the selection (Font and Paragraph for a text box, Fill and Outline for a shape, Picture, Table, Chart, Arrange, Size and position, ...). Hide sections with inspector.hiddenSections and move sections to the front with inspector.sectionOrder:
const customization: ViewerCustomization = {
inspector: { hiddenSections: ['effects'], sectionOrder: ['sizePosition'] },
};Section ids are slide, font, paragraph, picture, table, chart, smartArt, media, object, fill, outline, effects, arrange, sizePosition, altText and action. Which sections are open is remembered per selection kind for the session only; nothing is stored.
Every binding renders the same PowerPoint-style chrome: a ribbon, a File tab, a File > Options (Settings) dialog, right-click menus, a keyboard map, a slide rail, an inspector, a status bar and a handful of dialogs. Most embeddings do not need all of it. A kiosk wants no editing chrome at all; a corporate portal wants the AI assistant gone and the author name pinned to the signed-in user; a teaching tool wants a three-tab ribbon.
All of that is one object, ViewerCustomization, which you pass to the viewer and can change at runtime:
import type { ViewerCustomization } from 'pptx-react-viewer'; // or vue / angular / svelte / vanilla
const customization: ViewerCustomization = {
ribbon: {
hiddenTabs: ['draw', 'record'],
hiddenGroups: ['insert.media'],
hiddenButtons: ['broadcast', 'home.font.changeCase'],
},
options: {
hiddenPages: ['trust', 'addIns'],
locked: { 'general.userName': 'Ada Lovelace' },
defaults: { 'advanced.showGrid': true },
},
contextMenu: { hiddenElementCommands: ['save-as-picture'] },
keyboard: { disabled: ['newSlide'], remap: { duplicate: 'Mod+Shift+D' } },
hiddenPanels: ['notes'],
disabledFeatures: ['ai'],
hiddenDialogs: ['broadcast'],
hiddenExportFormats: ['video', 'gif'],
capabilities: { print: false },
regions: { 'dialog.options': 'acme-settings' }, // your own Settings view
};The object, its types, its id catalogues and the helper methods are identical in all five bindings. The logic lives once in ooxml-ui/pptx (src/ui/src/pptx/render/customization/), so a customisation that works in React works the same way in Svelte.
What you can configure
Everything below is either a field of customization (this guide) or a prop of the viewer component (the binding's own guide). The customisation fields:
| You want to | Field |
|---|---|
| Hide ribbon tabs, groups, controls and toolbar buttons | ribbon.hiddenTabs, ribbon.hiddenGroups, ribbon.hiddenButtons |
| Add your own ribbon tabs | the ribbonAddIns prop (below) |
| Hide, lock or set defaults for File > Options pages, sections and settings | options.hiddenPages, options.hiddenSections, options.hiddenSettings, options.locked, options.defaults |
| Remove File > Options entirely | hiddenDialogs: ['options'] |
| Replace File > Options with your own Settings view | regions['dialog.options'] |
| Hide File tab pages and cards | backstage.hiddenPages, backstage.hiddenCards |
| Add your own File tab pages | backstage.extraPages |
| Replace a File tab page | regions['backstage.<page>'] |
| Hide or add context-menu commands | contextMenu.* |
| Disable or remap shortcuts | keyboard.* |
| Hide panels (inspector, slide rail, notes, status bar, title bar, Selection Pane, Find and Replace, ...) | hiddenPanels |
| Replace the inspector, slide rail, notes or status bar | regions.inspector, regions.slidesPane, regions.notes, regions.statusBar |
| Hide inspector cards | inspector.hiddenCards |
| Switch off AI, collaboration, comments, present mode, Edit Points | disabledFeatures |
| Remove dialogs and every entry point that opens them | hiddenDialogs |
| Replace the Share, Broadcast or Print dialog body | regions['dialog.share'], regions['dialog.broadcast'], regions['dialog.print'] |
| Remove export formats | hiddenExportFormats |
| Remove drawing tools | hiddenDrawingTools |
| Make the deck read-only, or forbid export, print, share, copy, present or comment | capabilities |
Concepts
Hide, lock, default
There are three different things you can do to a setting in File > Options, and they compose:
| You want | Use |
|---|---|
| The user never sees the setting | options.hiddenSettings: ['general.userInitials'] |
| The setting has a fixed value the user cannot change | options.locked: { 'general.userName': 'Ada' } (renders read-only) |
| Both: a fixed value and no control at all | put the id in locked and hiddenSettings |
| A different starting value the user may still change | options.defaults: { 'advanced.showGrid': true } |
- A locked value is forced into the options store immediately and every later write to it is ignored, whichever path it comes from (the dialog, a ribbon toggle that writes the same option, Reset). The control renders disabled with the tooltip "This setting is managed by your organization". Locked values are never written to the user's saved preferences, so removing the lock gives the user back their own value.
- A default replaces the built-in default for users who have not saved a choice of their own, and becomes what Reset returns to. Host defaults are not persisted either: change the default in a later release and every user who never touched that setting follows it, while users who did keep their choice.
Derived rules
Some ids switch off more than one entry point, so you do not have to list every button that opens a dialog. These rules are applied once, in the shared resolver:
hiddenDialogs: ['share']removes the Share button, the File > Share page and the Share card.['print']removes File > Print and the Print card;['export']removes the Export button and File > Export;['options']removes File > Options.disabledFeatures: ['collaboration']hides the Share and Broadcast dialogs (and so all of the above for them).disabledFeatures: ['ai']removes the AI toggle and panel, the "Ask AI" / "Fix with AI" context-menu entries and the AI page of File > Options, even when the host passes anaiconfig.disabledFeatures: ['comments']removes the Add Comment context-menu entry and the Comments groups of the Insert and Review tabs.disabledFeatures: ['presentMode']removes the Slide Show ribbon tab and the F5 / Shift+F5 start-show shortcuts.hiddenExportFormatsremoves individual File > Export cards; hiding all six removes the Export button and page too.- Hiding a panel removes the ribbon controls and shortcuts that open it:
findReplacetakes Home > Find / Replace and Ctrl+F / Ctrl+H with it,selectionPaneView > Selection Pane,accessibilityPaneReview > Check Accessibility and Help > Accessibility checker,comparePaneReview > Compare, andnotesthe Notes buttons. - Hiding a dialog does the same for its entry points:
hyperlinkremoves Insert > Link, the Link menu entry and Ctrl+K;equationInsert > Equation;pasteSpecialits shortcut;slideTemplatesthe Slide Templates entry of Home > New Slide;passwordProtectionandsignaturestheir File > Info cards. capabilitiesexpand into the lists above (see Capabilities).- An Options section that loses every control is removed; an Options page that loses every section is removed. Menus repair their separators when the first entry of a group is hidden.
Props and the imperative API
Pass the object as the customization prop (input, option) to set it up front, and use the imperative helpers on the component handle to change it while the viewer is running. Every change re-renders the affected chrome immediately; nothing needs to be remounted.
- The prop replaces: when you give the viewer a new
customizationobject, it becomes the whole customisation, discarding helper-method edits made since. Keep the object stable (memoise it, or keep it in state) unless you mean to replace it. - The helpers merge:
hideRibbonTab('draw')adds one id to what is there.updateCustomization(patch)merges one level deep (each section merges field by field; a list you pass replaces that list).
Back-compat: hiddenActions and Customize Ribbon
The older hiddenActions prop keeps working. It is unioned with ribbon.hiddenTabs and ribbon.hiddenButtons, so you can migrate at your own pace. The user's own File > Options > Customize Ribbon choices are unioned on top: a tab is shown only if neither the host nor the user hid it.
Ribbon groups and controls
Below the tab level, every ribbon group and every control inside a group has a stable id from one shared catalogue: <tab>.<group> for a group and <tab>.<group>.<control> for a control, named after PowerPoint's own captions (home.font, home.font.bold, insert.media.media, view.show.ruler). The contextual tabs that appear for a selection (shapeFormat, pictureFormat, tableDesign, tableLayout, chartDesign, chartFormat, smartArtDesign) are addressed the same way, and their tab ids are accepted by ribbon.hiddenTabs.
const customization: ViewerCustomization = {
ribbon: {
hiddenGroups: ['home.editing', 'insert.media'],
hiddenButtons: ['home.font.changeCase', 'home.paragraph.columns', 'mergeShapes'],
hiddenTabs: ['chartDesign'],
},
};ribbon.hiddenButtons takes both kinds of id: the older top-level toolbar buttons (share, zoom, ...) and the catalogued ribbon controls. mergeShapes / home.arrange.mergeShapes and crop / home.arrange.crop name the same control, so either spelling hides it. Either crop spelling also hides the second crop entry point, pictureFormat.size.crop (Picture Format > Size); naming pictureFormat.size or pictureFormat.size.crop hides only that one. The full lists are in the reference below.
Every binding tags its ribbon markup with data-ribbon-group and data-ribbon-control and renders one stylesheet the shared model generates from the resolved customisation, scoped to that viewer (data-pptx-ribbon-scope), so a hidden group or control is removed from layout and from the accessibility tree in all five bindings the same way. The attributes are also a stable hook for your own styling or tests.
Host ribbon tabs (ribbonAddIns)
Customisation removes things; ribbonAddIns adds a tab of your own after Help, as an Office add-in does. It is a separate prop on every binding (ribbonAddIns in React, Svelte and the vanilla options, :ribbon-add-ins in Vue, [ribbonAddIns] in Angular; the vanilla instance also has setRibbonAddIns(tabs)), and takes the same plain descriptor the Word, Excel and Visio editors take:
const tabs = [
{
id: 'reports',
label: 'Reports',
groups: [
{
label: 'Export',
commands: [
{ id: 'export', label: 'Export', icon: 'save', run: () => exportReport() },
{ id: 'options', label: 'Options', size: 'small' },
],
},
],
},
];
<PowerPointViewer content={bytes} ribbonAddIns={tabs} />;A chosen command runs its run callback and then dispatches a bubbling office-ribbon-add-in DOM event (detail: { tab, command }) from inside the viewer, so one listener on the viewer's container hears every host command. There is no per-binding callback prop for it.
- A tab cannot take the id of a built-in or contextual tab; such a tab is left out.
labelis your own text and is not translated. size: 'small'commands fill columns of three. The PowerPoint ribbon has no drop-down for host commands, so a command withitemsis drawn as its items, as small commands titled with the parent's label.- Passing an equal descriptor again, as a framework does on every render, keeps the tab's controls and only replaces the callbacks. Removing the tab that is showing returns the ribbon to Home.
- Host tabs show in the desktop ribbon only; the phone toolbar and its menu sheet do not list them.
hiddenActionsandribbon.hiddenTabsdo not apply to host tabs: leave a tab out of the list to hide it.
The imperative API
Every binding exposes these methods on its component handle (React ref, Vue template ref, Angular component instance, Svelte bind:this, Vanilla instance):
| Method | Effect |
|---|---|
getCustomization() | The current ViewerCustomization (a snapshot; do not mutate it). |
setCustomization(c) | Replace the whole customisation. |
updateCustomization(patch) | Merge a partial customisation. |
resetCustomization() | Back to the stock UI. |
hideRibbonTab(id) / showRibbonTab(id) | Toggle one ribbon tab (a contextual tab id stops that tab appearing). |
hideRibbonGroup(id) / showRibbonGroup(id) | Toggle one group inside a tab (home.font). |
hideToolbarButton(id) / showToolbarButton(id) | Toggle one toolbar button, control cluster or ribbon control. |
hideRibbonControl(id) / showRibbonControl(id) | Toggle one ribbon control (home.font.bold). |
hideOptionsPage(id) / showOptionsPage(id) | Toggle one File > Options page. |
hideOptionsSection(id) / showOptionsSection(id) | Toggle one section of an Options page. |
hideSetting(id) / showSetting(id) | Toggle one setting. |
lockSetting(id, value, hidden?) | Pin a setting to value; hidden: true also removes its control. |
unlockSetting(id) | Remove a lock. |
setSettingDefault(id, value) | Set a host default (undefined clears it). |
hideBackstagePage(id) / showBackstagePage(id) | Toggle one File tab page. |
hideBackstageCard(id) / showBackstageCard(id) | Toggle one File tab action card. |
hideContextMenuCommand(id) / showContextMenuCommand(id) | Toggle one element context-menu entry. |
hideCanvasContextMenuCommand(id) / showCanvasContextMenuCommand(id) | Toggle one empty-canvas context-menu entry. |
disableShortcut(id) / enableShortcut(id) | Toggle one editor shortcut. |
remapShortcut(id, chords) | Move a command onto new chord(s); undefined restores the built-in chord. |
setPanelVisible(id, visible) | Show or hide a chrome region. |
setFeatureEnabled(id, enabled) | Switch a feature area on or off. |
setDialogAvailable(id, available) | Allow or remove a dialog and its entry points. |
setCapability(id, allowed) | Switch a capability; undefined returns it to the default. |
setRegion(id, renderer) | Replace a region with your UI; undefined restores the built-in. |
addBackstagePage(page) / removeBackstagePage(id) | Add (or replace by id) and remove a host File tab page. |
Shortcut chords
A chord is Modifier+Modifier+Key: modifiers are Mod (Ctrl on Windows and Linux, Cmd on macOS), Ctrl, Meta, Alt and Shift; the key is a KeyboardEvent.key value such as D, Delete, ArrowLeft or F2 (write Plus for +). Letters match case-insensitively. A remapped command stops answering to its built-in chord. Remapped chords keep every built-in guard: they never fire in a read-only viewer, during a slide show, while the user is typing in a text box, or (for selection commands) with nothing selected. nudge and escape can be disabled but not remapped.
Per-binding usage
import { PowerPointViewer } from 'pptx-react-viewer';
import type { PowerPointViewerHandle, ViewerCustomization } from 'pptx-react-viewer';
import { useMemo, useRef } from 'react';
export function Deck({ bytes }: { bytes: Uint8Array }) {
const viewer = useRef<PowerPointViewerHandle>(null);
// Memoise: a new object each render would replace helper edits.
const customization = useMemo<ViewerCustomization>(
() => ({ ribbon: { hiddenTabs: ['draw'] }, disabledFeatures: ['ai'] }),
[],
);
return (
<>
<button onClick={() => viewer.current?.hideRibbonTab('insert')}>Hide Insert</button>
<PowerPointViewer ref={viewer} content={bytes} canEdit customization={customization} />
</>
);
}<script setup lang="ts">
import { PowerPointViewer } from 'pptx-vue-viewer';
import type { PowerPointViewerExpose, ViewerCustomization } from 'pptx-vue-viewer';
import { ref } from 'vue';
defineProps<{ bytes: Uint8Array }>();
const viewer = ref<PowerPointViewerExpose | null>(null);
const customization: ViewerCustomization = {
ribbon: { hiddenTabs: ['draw'] },
disabledFeatures: ['ai'],
};
</script>
<template>
<button @click="viewer?.hideRibbonTab('insert')">Hide Insert</button>
<PowerPointViewer ref="viewer" :content="bytes" can-edit :customization="customization" />
</template>import { Component, viewChild } from '@angular/core';
import { PowerPointViewerComponent } from 'pptx-angular-viewer';
import type { ViewerCustomization } from 'pptx-angular-viewer';
@Component({
selector: 'app-deck',
imports: [PowerPointViewerComponent],
template: `
<button (click)="viewer()?.hideRibbonTab('insert')">Hide Insert</button>
<pptx-viewer #viewer [content]="bytes" [canEdit]="true" [customization]="customization" />
`,
})
export class DeckComponent {
bytes: Uint8Array | null = null;
readonly viewer = viewChild<PowerPointViewerComponent>('viewer');
readonly customization: ViewerCustomization = {
ribbon: { hiddenTabs: ['draw'] },
disabledFeatures: ['ai'],
};
}<script lang="ts">
import { PowerPointViewer } from 'pptx-svelte-viewer';
import type { ViewerCustomization } from 'pptx-svelte-viewer';
let { bytes }: { bytes: Uint8Array } = $props();
let viewer: ReturnType<typeof PowerPointViewer> | undefined = $state();
const customization: ViewerCustomization = {
ribbon: { hiddenTabs: ['draw'] },
disabledFeatures: ['ai'],
};
</script>
<button onclick={() => viewer?.hideRibbonTab('insert')}>Hide Insert</button>
<PowerPointViewer bind:this={viewer} source={bytes} editable {customization} />import { createPptxViewer } from 'pptx-vanilla-viewer';
import type { ViewerCustomization } from 'pptx-vanilla-viewer';
const customization: ViewerCustomization = {
ribbon: { hiddenTabs: ['draw'] },
disabledFeatures: ['ai'],
};
const viewer = createPptxViewer(document.getElementById('deck')!, {
source: bytes,
editable: true,
customization,
});
document.getElementById('hide-insert')!.addEventListener('click', () => {
viewer.hideRibbonTab('insert');
});Replace a region with your own UI
Hiding removes a region; replacing keeps its place in the layout and hands that place to you. The viewer renders an empty container where the built-in UI would be (the inspector's column, the Options dialog's body, a File tab page) and you fill it, in any framework or none. Put the renderer under regions:
const customization: ViewerCustomization = {
regions: {
'dialog.options': 'acme-settings', // a custom element you registered
inspector: (container, context) => {
const view = new AcmeInspector(container, context.viewer);
view.show(context.selectedElementIds);
return {
update: (next) => view.show(next.selectedElementIds),
destroy: () => view.dispose(),
};
},
},
};Regions
| Region | What you replace | What the viewer keeps |
|---|---|---|
inspector | The inspector pane | Its column, width, resize handle, open/closed state and mobile sheet |
slidesPane | The slide thumbnail rail | Its width and collapse state |
notes | The speaker-notes panel | Its height, resize handle and collapse state |
statusBar | The status bar | Its row under the canvas |
dialog.options | The body of File > Options (the Settings dialog) | The dialog frame: backdrop, title, close button, Escape |
dialog.share, dialog.broadcast, dialog.print | The body of that dialog | The dialog frame |
backstage.<page> | The body of one File tab page (backstage.info, backstage.export, ...) | The File tab nav, title and back button |
The full list is in the reference. Hiding wins over replacing: a region that is also hidden (through hiddenPanels, hiddenDialogs, backstage.hiddenPages or a capability) is not rendered at all.
Renderer forms
A region takes any of three forms. Use whichever fits your stack:
- A mount function
(container, context) => cleanup | handle | void. It runs once when the region appears. Return a cleanup function, or a handle{ update?(context), destroy?() }to also receive context changes. - A custom element tag, as a string (
'acme-settings'). The viewer creates the element, appends it to the container and assigns itscontextproperty, then assignscontextagain whenever the context changes. Register the element yourself before the region first appears. - A custom element spec
{ element: 'acme-settings', properties: { tenant } }. The same, withpropertiesassigned once before the element is attached. An equal spec passed again (same tag, same property values) keeps the element.
The viewer remounts a region only when its renderer changes: a different function, a different tag, or different properties. Define mount functions once (outside a render function, or memoised), as you do for the rest of the customization object.
A renderer that throws is caught and logged; it never takes the viewer down.
When a region is mounted
A replaced region appears exactly where and when the built-in would, and the viewer keeps the slot's own behaviour:
- Visibility rules carry over. A read-only deck has no inspector, so it has no host inspector either; a region the built-in shows only on desktop, or only while editing, follows the same rule.
- Collapsing hides, it does not unmount. Collapsed notes or a closed inspector keep your renderer mounted and hidden, so its state survives; it is destroyed when the region stops being replaced, its renderer changes, or the viewer is destroyed.
- Size stays with the viewer. The inspector keeps its width and resize handle, the notes panel its height, resize handle and collapse toggle. Your content fills the container (
widthandheightare 100%). - Phone layouts replace the same content inside the bottom sheets that hold the inspector, notes and slide rail.
close()on a dialog behaves like the dialog's close (X) button: it closes the dialog and keeps every change made throughsetOption.
Each container carries a data-pptx-region="<id>" attribute, a stable hook for your own CSS and tests.
The context
Every renderer receives a ViewerRegionContext:
| Field | Meaning |
|---|---|
region | The region id (inspector, dialog.options, backstage.host.<id>, ...) |
viewer | The viewer's imperative API, the same object as the component handle: getSlides(), getElementById(), updateElement(), goTo(), undo(), the customisation helpers, ... |
mode | 'edit', 'preview', 'present' or 'master' |
canEdit | false when the deck is read-only (edit prop, capabilities.edit or protection) |
activeSlideIndex, slideCount | The active slide (zero-based) and the slide count |
selectedElementIds | The selected elements on the active slide (empty: nothing selected) |
locale | The active UI locale |
close() | Closes the dialog, leaves the File tab or closes the inspector; a no-op for the status bar, notes and slides pane |
dialog.options adds the File > Options model, so a host Settings view can read and write the same settings the built-in dialog does:
| Field | Meaning |
|---|---|
options | The current ViewerOptions (host locks applied) |
setOption(id, value) | Change one setting by its <group>.<key> id (advanced.showGrid); locked settings ignore it |
resetOptions() | Back to the host defaults, or the built-ins |
close, setOption and resetOptions are stable: keeping an older context and calling them later is safe.
Every binding shows File > Options in the shared <pptx-ui-options-dialog> element. A replaced body is slotted into it (slot="body"), in the page's own DOM rather than the element's shadow tree, so your page styles reach it. Your view sizes itself; the dialog scrolls it when it is taller than the window. The close button and Escape keep your setOption edits, as in the built-in dialog.
Mounting a framework component
The mount function is framework-neutral, so a region can hold a component from any framework, including a different one from the viewer's binding:
import type { ViewerRegionMount } from 'ooxml-ui/pptx';
import { createRoot } from 'react-dom/client';
const settings: ViewerRegionMount = (container, context) => {
const root = createRoot(container);
root.render(<AcmeSettings context={context} />);
return {
update: (next) => root.render(<AcmeSettings context={next} />),
destroy: () => root.unmount(),
};
};
<PowerPointViewer content={bytes} customization={{ regions: { 'dialog.options': settings } }} />;import type { ViewerRegionContext, ViewerRegionMount } from 'ooxml-ui/pptx';
import { createApp, shallowRef } from 'vue';
const settings: ViewerRegionMount = (container, context) => {
const current = shallowRef<ViewerRegionContext>(context);
const app = createApp(AcmeSettings, { context: current });
app.mount(container);
return { update: (next) => (current.value = next), destroy: () => app.unmount() };
};import { createComponent, type ApplicationRef, type EnvironmentInjector } from '@angular/core';
import type { ViewerRegionMount } from 'pptx-angular-viewer';
function settingsRegion(app: ApplicationRef, injector: EnvironmentInjector): ViewerRegionMount {
return (container, context) => {
const ref = createComponent(AcmeSettingsComponent, {
environmentInjector: injector,
hostElement: container.appendChild(document.createElement('acme-settings-host')),
});
ref.setInput('context', context);
app.attachView(ref.hostView);
return {
update: (next) => ref.setInput('context', next),
destroy: () => {
app.detachView(ref.hostView);
ref.destroy();
},
};
};
}import type { ViewerRegionMount } from 'ooxml-ui/pptx';
// settings-region.svelte.ts (runes need a .svelte.ts module)
import { mount, unmount } from 'svelte';
const settings: ViewerRegionMount = (container, context) => {
const props = $state({ context });
const component = mount(AcmeSettings, { target: container, props });
return { update: (next) => (props.context = next), destroy: () => unmount(component) };
};import type { ViewerRegionMount, ViewerSettingsRegionContext } from 'ooxml-ui/pptx';
const settings: ViewerRegionMount = (container, context) => {
// `dialog.options` receives the settings model on top of the base context.
const { options, setOption } = context as ViewerSettingsRegionContext;
const grid = document.createElement('label');
const box = document.createElement('input');
box.type = 'checkbox';
box.checked = options.advanced.showGrid;
box.addEventListener('change', () => setOption('advanced.showGrid', box.checked));
grid.append(box, ' Show gridlines');
container.append(grid);
};Your own File tab pages
backstage.extraPages adds pages to the File tab, after the built-in pages of their group. Each page's body is a region (backstage.host.<id>) and takes the same renderer forms:
const customization: ViewerCustomization = {
backstage: {
extraPages: [
{ id: 'policies', label: 'Policies', render: 'acme-policies' },
{ id: 'about', label: 'About Acme', group: 'footer', render: mountAbout },
],
},
};label is your own text and is not translated. Page ids must be unique among your pages; a repeated id is ignored. addBackstagePage(page) and removeBackstagePage(id) change them at runtime.
Capabilities
capabilities states what the user may do, one switch per capability, and removes every path to what is switched off: buttons, menu entries, shortcuts, File pages and cards. An omitted key (or true) leaves the viewer's own rules in charge.
const portal: ViewerCustomization = {
capabilities: { edit: false, export: false, print: false, copy: false },
};| Capability | false means |
|---|---|
edit | The deck opens read-only, whatever the edit prop says (canEdit, editable). |
export | No File > Export page, Export button or export cards. |
print | No Print dialog, File > Print page or Print card. |
share | No Share or Broadcast dialogs, buttons, pages or cards. |
copy | No Copy, Cut or Save as Picture (menus, ribbon, shortcuts) and no Copy as image. |
present | No Slide Show tab or F5 / Shift+F5 (the presentMode feature). |
comment | No Add Comment entry and no Comments groups in Insert and Review (the comments feature). |
Capabilities are UI policy, not document protection. A user with the browser's developer tools still has the bytes you handed the viewer; if a deck must not be copied or exported, do not send it to the browser.
setCapability(id, allowed) changes one at runtime; undefined returns it to the default.
Recipes
Kiosk: a viewer with no editing chrome
Read-only already hides the editing commands; this also removes everything a kiosk visitor could wander into.
const kiosk: ViewerCustomization = {
ribbon: {
hiddenTabs: [
'file',
'home',
'insert',
'draw',
'design',
'transitions',
'animations',
'record',
'review',
'view',
'help',
],
hiddenButtons: ['share', 'broadcast', 'export', 'undo', 'redo', 'record'],
},
hiddenPanels: ['inspector', 'notes', 'quickAccessToolbar'],
disabledFeatures: ['ai', 'collaboration', 'comments'],
hiddenDialogs: ['options', 'print', 'export'],
contextMenu: { disableElementMenu: true, disableCanvasMenu: true },
keyboard: { disableAll: true },
};Leave slideShow (and the navigation and fullscreen buttons) visible so visitors can still present.
Hide the Settings pages users do not need
const settings: ViewerCustomization = {
options: {
hiddenPages: ['proofing', 'addIns', 'trust', 'quickAccess', 'ribbon'],
hiddenSections: ['general.startup', 'save.cache', 'advanced.print'],
hiddenSettings: ['advanced.disableHardwareAcceleration'],
},
};To remove File > Options entirely, use hiddenDialogs: ['options'].
Pin the user identity, locale and theme
The author name comes from the signed-in user and must not be edited:
viewer.lockSetting('general.userName', currentUser.displayName);
viewer.lockSetting('general.userInitials', currentUser.initials, true); // locked and hiddenLocale and theme are host props rather than Options settings. Pin them with your binding's locale and theme props (defaultLocale / locale, theme / defaultThemeKey, see the Localization and Theming guides), then remove the pickers:
const pinned: ViewerCustomization = {
options: {
hiddenPages: ['language'], // the display-language picker
hiddenSections: ['general.appearance'], // the viewer theme picker
},
};Remove AI and collaboration
const noCloud: ViewerCustomization = { disabledFeatures: ['ai', 'collaboration'] };With ai disabled the assistant stays off even if an ai config is passed, which lets one build ship to tenants with and without the add-on:
viewer.setFeatureEnabled('ai', tenant.hasAiAddOn);Trim the ribbon to a minimal set
import { RIBBON_TAB_IDS } from 'pptx-react-viewer';
const keep = new Set(['file', 'home', 'insert']);
const minimal: ViewerCustomization = {
ribbon: {
hiddenTabs: RIBBON_TAB_IDS.filter((id) => !keep.has(id)),
hiddenButtons: ['broadcast', 'record'],
},
};Company shortcuts
const keys: ViewerCustomization = {
keyboard: {
disabled: ['newSlide', 'toggleShortcuts'],
remap: { duplicate: 'Mod+Shift+D', group: ['Mod+G', 'Alt+G'] },
},
};Your own Settings view
Keep the viewer's Options dialog frame but show your own settings, reading and writing the same model:
customElements.define(
'acme-settings',
class extends HTMLElement {
set context(context: ViewerSettingsRegionContext) {
this.textContent = '';
const grid = document.createElement('input');
grid.type = 'checkbox';
grid.checked = context.options.advanced.showGrid;
grid.onchange = () => context.setOption('advanced.showGrid', grid.checked);
const done = document.createElement('button');
done.textContent = 'Done';
done.onclick = () => context.close();
this.append(grid, done);
}
},
);
const customization: ViewerCustomization = { regions: { 'dialog.options': 'acme-settings' } };To send users to your application's own settings page instead, hide the dialog (hiddenDialogs: ['options']) and add a File tab page or a ribbon add-in command that navigates there.
A read-only portal
const portal: ViewerCustomization = {
capabilities: { edit: false, export: false, print: false, share: false, copy: false },
disabledFeatures: ['ai'],
hiddenPanels: ['inspector'],
};Build your own admin screen
Every id list is exported as a runtime array, alongside the types: RIBBON_TAB_IDS, TOOLBAR_BUTTON_IDS, OPTIONS_PAGE_IDS, OPTIONS_SECTION_IDS, OPTIONS_SETTING_IDS, BACKSTAGE_PAGE_IDS, BACKSTAGE_CARD_IDS, ELEMENT_CONTEXT_MENU_COMMAND_IDS, CANVAS_CONTEXT_MENU_COMMAND_IDS, EDITOR_SHORTCUT_ACTION_IDS, VIEWER_PANEL_IDS, VIEWER_FEATURE_IDS, VIEWER_DIALOG_IDS, VIEWER_EXPORT_FORMAT_IDS. VIEWER_CAPABILITY_IDS and VIEWER_REGION_IDS are exported from ooxml-ui/pptx. Render checkboxes from them, store the resulting object per tenant, and feed it back through setCustomization.
What is not customisable yet
- Controls inside a dropped-down menu or gallery (a single entry of the Bullets library, one Shape Styles tile) are not addressable; hide the control that opens the menu instead.
- The slide-show, slide-sorter and presenter keymaps.
keyboardcovers the editor keymap. The only show key it affects is F5 / Shift+F5, through thepresentModefeature. - The keyboard-shortcut reference (the
?overlay and Options > Customize Ribbon > Keyboard Shortcuts) lists the built-in chords, not your remaps. Hide it withkeyboard.disabled: ['toggleShortcuts']andoptions.hiddenSections: ['ribbon.shortcutReference']if that matters. - Inspector sections and the slide rail's own context menu are not addressable individually; hide the whole region with
hiddenPanels, or replace the whole inspector withregions.inspector. - Replaceable regions are the ones listed under Regions. The ribbon, title bar, Quick Access strip and the other dialogs can be hidden but not replaced; add your own ribbon tab with
ribbonAddInsinstead. - Framework-native slots (React render props, Vue slots, Angular templates, Svelte snippets) are not offered; every binding takes the same mount function or custom element, which can render a component of any framework (see Mounting a framework component).
- Mobile layouts honour ribbon, menu, dialog and feature customisation, but the mobile bottom sheets have no panel ids of their own, and some mobile bottom-bar buttons (Slides, Notes, Format) stay visible when their panel is hidden (tapping them does nothing).
- Quick Access commands a user added (for example Print) stay in the strip when their dialog is removed; they are inert rather than hidden.
presentModeremoves the Slide Show tab and F5 / Shift+F5, but not every secondary "present" affordance (for example a view switcher's Present option in some bindings).- Vanilla has no
update(options), so itscustomizationoption is the initial value only; change it at runtime withsetCustomizationand the other helpers. A change rebuilds the chrome (assetLocaledoes), which returns the ribbon to its first tab. - React's headless
useViewerBuildingBlockscomposition does not take acustomization; use thePowerPointViewercomponent.
Reference
Generated from the shared id catalogues (bun run docs:customization); a unit test fails if an id is missing here.
Home's Arrange menu moved into Drawing. Existing hiddenGroups: ['home.arrange'] settings still hide the menu and its commands. Use home.drawing.arrange to hide the menu trigger alone. Use home.arrange.align-left and the other alignment and distribution row IDs below to hide individual rows. The older home.arrange.align ID hides all eight rows in Drawing and the alignment control in contextual tabs. Use shapeFormat.arrange or pictureFormat.arrange to hide a contextual group. Duplicate and Delete are available from the context menu and their keyboard shortcuts. Format Painter uses home.clipboard.formatPainter. SmartArt Format retains smartArtFormat.arrange.align for its Align menu and its existing Arrange control IDs.
Ribbon tabs (ribbon.hiddenTabs)
| Id | Tab |
|---|---|
file | File |
home | Home |
insert | Insert |
draw | Draw |
design | Design |
transitions | Transitions |
animations | Animations |
slideShow | Slide Show |
record | Record |
review | Review |
view | View |
help | Help |
shapeFormat | Shape Format |
pictureFormat | Picture Format |
tableDesign | Table Design |
tableLayout | Table Layout |
chartDesign | Chart Design |
chartFormat | Chart Format |
smartArtDesign | SmartArt Design |
videoFormat | Video Format |
audioFormat | Audio Format |
playback | Playback |
smartArtFormat | SmartArt Format |
Ribbon groups (ribbon.hiddenGroups)
| Id | Group |
|---|---|
home.clipboard | Clipboard |
home.slides | Slides |
home.font | Font |
home.paragraph | Paragraph |
home.drawing | Drawing |
home.arrange | Arrange (legacy group alias) |
home.editing | Editing |
home.addIns | Add-ins |
insert.slides | Slides |
insert.tables | Tables |
insert.images | Images |
insert.camera | Camera |
insert.illustrations | Illustrations |
insert.forms | Forms |
insert.addIns | Add-ins |
insert.links | Links |
insert.comments | Comments |
insert.text | Text |
insert.symbols | Symbols |
insert.media | Media |
draw.tools | Drawing Tools |
draw.selection | Select |
draw.pens | Pen presets |
draw.convert | Convert |
draw.guides | Guides |
draw.replay | Ink Replay |
design.themes | Themes |
design.variants | Variants |
design.customize | Customize |
design.designer | Designer |
transitions.preview | Preview |
transitions.transitionToThisSlide | Transition to This Slide |
transitions.timing | Timing |
animations.preview | Preview |
animations.animation | Animation |
animations.motionPath | Motion Paths |
animations.advancedAnimation | Advanced Animation |
animations.timing | Timing |
slideShow.startSlideShow | Start Slide Show |
slideShow.present | Present |
slideShow.setUp | Set Up |
slideShow.captions | Captions & Subtitles |
record.camera | Camera |
record.record | Record |
record.manage | Manage |
record.help | Help |
review.proofing | Proofing |
review.accessibility | Accessibility |
review.language | Language |
review.comments | Comments |
review.compare | Compare |
review.protect | Protect |
review.ink | Ink |
view.presentationViews | Presentation Views |
view.masterViews | Master Views |
view.show | Show |
view.zoom | Zoom |
view.window | Window |
help.help | Help |
shapeFormat.shapeStyles | Shape Styles |
shapeFormat.wordArtStyles | WordArt Styles |
shapeFormat.arrange | Arrange |
pictureFormat.adjust | Adjust |
pictureFormat.pictureStyles | Picture Styles |
pictureFormat.size | Size |
pictureFormat.accessibility | Alt Text |
pictureFormat.arrange | Arrange |
tableDesign.tableStyles | Table Styles |
tableLayout.table | Table |
tableLayout.rowsColumns | Rows & Columns |
tableLayout.merge | Merge |
tableLayout.cellSize | Cell Size |
tableLayout.alignment | Alignment |
tableLayout.tableSize | Table Size |
tableLayout.arrange | Arrange |
chartDesign.chartLayouts | Chart Layouts |
chartDesign.chartStyles | Chart Styles |
chartFormat.currentSelection | Current Selection |
smartArtDesign.createGraphic | Create Graphic |
smartArtDesign.layouts | Layouts |
smartArtDesign.smartArtStyles | SmartArt Styles |
smartArtDesign.reset | Reset |
videoFormat.poster | Poster Frame |
videoFormat.adjust | Adjust |
videoFormat.pictureStyles | Video Styles |
videoFormat.arrange | Arrange |
videoFormat.size | Size |
audioFormat.adjust | Adjust |
audioFormat.pictureStyles | Picture Styles |
audioFormat.arrange | Arrange |
audioFormat.size | Size |
playback.bookmarks | Bookmarks |
playback.editing | Editing |
playback.options | Playback |
smartArtFormat.shapes | Shapes |
smartArtFormat.shapeStyles | Shape Styles |
smartArtFormat.wordArtStyles | WordArt Styles |
smartArtFormat.arrange | Arrange |
smartArtFormat.size | Size |
Ribbon controls (ribbon.hiddenButtons)
| Id | Control |
|---|---|
home.clipboard.paste | Paste |
home.clipboard.cut | Cut |
home.clipboard.copy | Copy |
home.clipboard.formatPainter | Format Painter |
home.slides.newSlide | New Slide |
home.slides.layout | Layout |
home.slides.reset | Reset |
home.slides.section | Section |
home.slides.slideTemplates | Slide templates (New Slide menu entry) |
home.font.fontFamily | Font |
home.font.fontSize | Font Size |
home.font.increaseFontSize | Increase Font Size |
home.font.decreaseFontSize | Decrease Font Size |
home.font.clearFormatting | Clear All Formatting |
home.font.bold | Bold |
home.font.italic | Italic |
home.font.underline | Underline |
home.font.strikethrough | Strikethrough |
home.font.shadow | Text Shadow |
home.font.characterSpacing | Character Spacing |
home.font.changeCase | Change Case |
home.font.fontColor | Font Color |
home.font.highlightColor | Text Highlight Color |
home.font.superscript | Superscript |
home.font.subscript | Subscript |
home.paragraph.bullets | Bullets (toggle and gallery) |
home.paragraph.numbering | Numbering (toggle and gallery) |
home.paragraph.decreaseIndent | Decrease List Level |
home.paragraph.increaseIndent | Increase List Level |
home.paragraph.lineSpacing | Line Spacing |
home.paragraph.alignLeft | Align Left |
home.paragraph.alignCenter | Center |
home.paragraph.alignRight | Align Right |
home.paragraph.justify | Justify |
home.paragraph.columns | Columns |
home.paragraph.textDirection | Text Direction |
home.paragraph.alignText | Align Text |
home.drawing.shapes | Shapes |
home.drawing.arrange | Arrange |
home.drawing.positionSize | Position & Size |
home.drawing.selectionPane | Selection Pane |
home.drawing.quickStyles | Quick Styles gallery |
home.drawing.shapeFill | Shape Fill |
home.drawing.shapeOutline | Shape Outline |
home.drawing.shapeEffects | Shape Effects gallery |
home.drawing.rotateRight | Rotate Right 90° |
home.drawing.rotateLeft | Rotate Left 90° |
home.arrange.bringForward | Bring Forward |
home.arrange.sendBackward | Send Backward |
home.arrange.bringToFront | Bring to Front |
home.arrange.sendToBack | Send to Back |
home.arrange.flipHorizontal | Flip Horizontal |
home.arrange.flipVertical | Flip Vertical |
home.arrange.group | Group |
home.arrange.ungroup | Ungroup |
home.arrange.align | Align and Distribute (alias) |
home.arrange.mergeShapes | Merge Shapes |
home.arrange.crop | Crop |
home.arrange.outlineWidth | Outline width |
home.arrange.duplicate | Duplicate |
home.arrange.delete | Delete |
home.arrange.align-left | Align Left |
home.arrange.align-center | Align Center |
home.arrange.align-right | Align Right |
home.arrange.align-top | Align Top |
home.arrange.align-middle | Align Middle |
home.arrange.align-bottom | Align Bottom |
home.arrange.distribute-horizontal | Distribute Horizontally |
home.arrange.distribute-vertical | Distribute Vertically |
home.editing.find | Find |
home.editing.replace | Replace |
home.editing.select | Select |
home.addIns.addIns | Add-ins |
insert.slides.newSlide | New Slide |
insert.slides.reuseSlides | Reuse Slides |
insert.tables.table | Table |
insert.images.pictures | Pictures |
insert.images.screenshot | Screenshot |
insert.images.photoAlbum | Photo Album |
insert.camera.cameo | Cameo |
insert.illustrations.shapes | Shapes |
insert.illustrations.icons | Icons |
insert.illustrations.threeDModels | 3D Models |
insert.illustrations.smartArt | SmartArt |
insert.illustrations.chart | Chart |
insert.forms.forms | Forms |
insert.addIns.getAddIns | Get Add-ins |
insert.addIns.myAddIns | My Add-ins |
insert.links.zoom | Zoom |
insert.links.link | Link |
insert.links.action | Action button |
insert.comments.comment | Comment |
insert.text.textBox | Text Box |
insert.text.headerFooter | Header & Footer |
insert.text.wordArt | WordArt |
insert.text.dateTime | Date & Time |
insert.text.slideNumber | Slide Number |
insert.text.object | Object |
insert.text.field | Date & Time and Slide Number (deprecated alias: use dateTime and slideNumber) |
insert.symbols.equation | Equation |
insert.symbols.symbol | Symbol |
insert.media.media | Video |
insert.media.audio | Audio |
insert.media.screenRecording | Screen Recording |
draw.tools.select | Select |
draw.tools.pen | Pen |
draw.tools.highlighter | Highlighter |
draw.tools.freeform | Freeform |
draw.tools.eraser | Eraser |
draw.tools.penColor | Pen colour |
draw.tools.penWidth | Pen width |
draw.selection.lasso | Lasso Select |
draw.pens.type | Pen type |
draw.pens.add | Add Pen |
draw.pens.presets | Pen presets |
draw.pens.remove | Remove preset |
draw.convert.inkToShape | Ink to Shape |
draw.convert.inkToMath | Ink to Math |
draw.guides.ruler | Ruler |
draw.guides.angle | Ruler angle |
draw.replay.start | Ink Replay |
draw.replay.play | Play or pause |
draw.replay.seek | Replay position |
draw.replay.close | Close replay |
design.themes.gallery | Themes (inline gallery) |
design.themes.browseThemes | Themes gallery |
design.themes.editTheme | Edit theme |
design.variants.gallery | Variants (inline gallery) |
design.variants.colors | Variants: Colors gallery |
design.variants.fonts | Variants: Fonts gallery |
design.variants.effects | Variants: Effects gallery |
design.variants.backgroundStyles | Variants: Background Styles gallery |
design.customize.slideSize | Slide Size |
design.customize.formatBackground | Format Background |
design.designer.designIdeas | Design Ideas |
transitions.preview.preview | Preview |
transitions.transitionToThisSlide.gallery | Transition gallery |
transitions.transitionToThisSlide.effectOptions | Effect Options |
transitions.timing.sound | Sound |
transitions.timing.duration | Duration |
transitions.timing.applyToAll | Apply To All |
transitions.timing.advanceOnClick | On Mouse Click |
transitions.timing.advanceAfter | After |
animations.preview.preview | Preview |
animations.animation.gallery | Animation gallery |
animations.animation.effectOptions | Effect Options |
animations.motionPath.gallery | Motion path gallery |
animations.advancedAnimation.addAnimation | Add Animation |
animations.advancedAnimation.animationPane | Animation Pane |
animations.advancedAnimation.trigger | Trigger |
animations.advancedAnimation.animationPainter | Animation Painter |
animations.advancedAnimation.remove | Remove animation |
animations.timing.start | Start |
animations.timing.duration | Duration |
animations.timing.delay | Delay |
animations.timing.reorder | Reorder |
slideShow.startSlideShow.fromBeginning | From Beginning |
slideShow.startSlideShow.fromCurrent | From Current Slide |
slideShow.startSlideShow.customShow | Custom Slide Show |
slideShow.present.presenterView | Presenter View |
slideShow.present.broadcast | Present Online |
slideShow.setUp.setUpSlideShow | Set Up Slide Show |
slideShow.setUp.hideSlide | Hide Slide |
slideShow.setUp.rehearseTimings | Rehearse Timings |
slideShow.setUp.record | Record |
slideShow.setUp.rehearseWithCoach | Rehearse with Coach |
slideShow.captions.subtitles | Always Use Subtitles |
slideShow.captions.subtitleSettings | Subtitle Settings |
record.camera.cameo | Cameo |
record.record.fromBeginning | From Beginning |
record.record.fromCurrent | From Current Slide |
record.manage.clear | Clear |
record.manage.reset | Reset to Cameo |
record.help.learnMore | Learn more |
review.proofing.spelling | Spelling |
review.proofing.thesaurus | Thesaurus |
review.accessibility.check | Check Accessibility |
review.language.translate | Translate |
review.language.language | Language |
review.comments.newComment | New Comment |
review.comments.delete | Delete |
review.comments.deleteSlide | Delete Slide Comments |
review.comments.deleteAll | Delete All Comments |
review.comments.previous | Previous |
review.comments.next | Next |
review.comments.showComments | Show Comments |
review.compare.compare | Compare |
review.compare.markAllRead | Mark all read |
review.protect.readOnly | Read-only |
review.protect.restrictPermission | Restrict Permission |
review.ink.hideInk | Hide Ink |
view.presentationViews.normal | Normal |
view.presentationViews.outline | Outline View |
view.presentationViews.slideSorter | Slide Sorter |
view.presentationViews.notesPage | Notes Page |
view.presentationViews.readingView | Reading View |
view.masterViews.slideMaster | Slide Master |
view.masterViews.handoutMaster | Handout Master |
view.masterViews.notesMaster | Notes Master |
view.show.ruler | Ruler |
view.show.gridlines | Gridlines |
view.show.guides | Guides |
view.show.snapToGrid | Snap to Grid |
view.show.snapToShape | Snap to Shape |
view.show.addGuide | Add horizontal / vertical guide |
view.show.selectionPane | Selection Pane |
view.show.eyedropper | Eyedropper |
view.show.notes | Notes |
view.zoom.zoom | Zoom |
view.zoom.fitToWindow | Fit to Window |
view.window.templateEditing | Edit template elements |
view.window.macros | Macros |
help.help.options | Options |
help.help.keyboardShortcuts | Keyboard shortcuts |
help.help.accessibility | Accessibility checker |
shapeFormat.shapeStyles.gallery | Shape Styles gallery |
shapeFormat.shapeStyles.shapeEffects | Shape Effects gallery |
shapeFormat.wordArtStyles.gallery | WordArt Styles gallery |
shapeFormat.arrange.rotateRight | Rotate Right 90° |
shapeFormat.arrange.rotateLeft | Rotate Left 90° |
shapeFormat.arrange.selectionPane | Selection Pane |
pictureFormat.adjust.corrections | Corrections gallery |
pictureFormat.adjust.color | Color gallery |
pictureFormat.adjust.artisticEffects | Artistic Effects gallery |
pictureFormat.adjust.removeBackground | Remove Background |
pictureFormat.adjust.compress | Compress Pictures |
pictureFormat.adjust.changePicture | Change Picture |
pictureFormat.adjust.resetPicture | Reset Picture |
pictureFormat.adjust.resetSize | Reset Picture & Size |
pictureFormat.pictureStyles.gallery | Picture Styles gallery |
pictureFormat.pictureStyles.pictureEffects | Picture Effects gallery |
pictureFormat.pictureStyles.graphicsFill | Graphics Fill gallery |
pictureFormat.pictureStyles.border | Picture Border |
pictureFormat.pictureStyles.layout | Picture Layout |
pictureFormat.size.crop | Crop |
pictureFormat.size.cropToShape | Crop to Shape |
pictureFormat.accessibility.altText | Alt Text |
pictureFormat.arrange.rotateRight | Rotate Right 90° |
pictureFormat.arrange.rotateLeft | Rotate Left 90° |
pictureFormat.arrange.selectionPane | Selection Pane |
tableDesign.tableStyles.gallery | Table Styles gallery |
tableLayout.table.select | Select |
tableLayout.table.viewGridlines | View Gridlines |
tableLayout.rowsColumns.deleteRows | Delete Rows |
tableLayout.rowsColumns.deleteColumns | Delete Columns |
tableLayout.rowsColumns.insertAbove | Insert Above |
tableLayout.rowsColumns.insertBelow | Insert Below |
tableLayout.rowsColumns.insertLeft | Insert Left |
tableLayout.rowsColumns.insertRight | Insert Right |
tableLayout.merge.mergeCells | Merge Cells |
tableLayout.merge.splitCells | Split Cells |
tableLayout.cellSize.distributeRows | Distribute Rows |
tableLayout.cellSize.distributeColumns | Distribute Columns |
tableLayout.alignment.alignLeft | Align Left |
tableLayout.alignment.alignCenter | Center |
tableLayout.alignment.alignRight | Align Right |
tableLayout.alignment.alignTop | Align Top |
tableLayout.alignment.alignMiddle | Center Vertically |
tableLayout.alignment.alignBottom | Align Bottom |
tableLayout.alignment.textDirection | Text Direction |
tableLayout.alignment.cellMargins | Cell Margins |
tableLayout.tableSize.size | Table Size |
tableLayout.arrange.arrange | Arrange |
chartDesign.chartLayouts.quickLayout | Quick Layout gallery |
chartDesign.chartStyles.changeColors | Change Colors gallery |
chartDesign.chartStyles.gallery | Chart Styles gallery |
chartFormat.currentSelection.chartElements | Chart Elements |
chartFormat.currentSelection.formatSelection | Format Selection |
chartFormat.currentSelection.resetToMatchStyle | Reset to Match Style |
smartArtDesign.createGraphic.addShape | Add Shape |
smartArtDesign.createGraphic.addShapeBefore | Add Shape Before |
smartArtDesign.createGraphic.addShapeAbove | Add Shape Above |
smartArtDesign.createGraphic.addBullet | Add Bullet |
smartArtDesign.createGraphic.textPane | Text Pane |
smartArtDesign.createGraphic.promote | Promote |
smartArtDesign.createGraphic.demote | Demote |
smartArtDesign.createGraphic.rightToLeft | Right to Left |
smartArtDesign.createGraphic.moveUp | Move Up |
smartArtDesign.createGraphic.moveDown | Move Down |
smartArtDesign.layouts.gallery | Layouts gallery |
smartArtDesign.smartArtStyles.changeColors | Change Colors gallery |
smartArtDesign.smartArtStyles.gallery | SmartArt Styles gallery |
smartArtDesign.reset.resetGraphic | Reset Graphic |
smartArtDesign.reset.convert | Convert |
videoFormat.poster.current | Current Frame |
videoFormat.poster.file | Image from File |
videoFormat.poster.reset | Reset Poster Frame |
videoFormat.adjust.corrections | Corrections |
videoFormat.adjust.color | Color |
videoFormat.pictureStyles.gallery | Video Styles |
videoFormat.pictureStyles.shape | Video Shape |
videoFormat.pictureStyles.border | Video Border |
videoFormat.pictureStyles.effects | Video Effects |
videoFormat.arrange.rotateRight | Rotate Right 90° |
videoFormat.size.width | Width |
videoFormat.size.height | Height |
videoFormat.size.crop | Crop |
audioFormat.adjust.corrections | Corrections |
audioFormat.adjust.color | Color |
audioFormat.pictureStyles.gallery | Picture Styles |
audioFormat.pictureStyles.shape | Shape |
audioFormat.pictureStyles.border | Border |
audioFormat.pictureStyles.effects | Picture Effects |
audioFormat.arrange.rotateRight | Rotate Right 90° |
audioFormat.size.width | Width |
audioFormat.size.height | Height |
playback.bookmarks.add | Add Bookmark |
playback.bookmarks.remove | Remove Bookmark |
playback.editing.trim | Trim |
playback.editing.fadeIn | Fade In |
playback.editing.fadeOut | Fade Out |
playback.options.volume | Volume |
playback.options.start | Start |
playback.options.fullScreen | Play Full Screen |
playback.options.hide | Hide While Not Playing |
playback.options.loop | Loop until Stopped |
playback.options.rewind | Rewind after Playing |
playback.options.across | Play Across Slides |
smartArtFormat.shapes.shape | Change Shape |
smartArtFormat.shapes.larger | Larger |
smartArtFormat.shapes.smaller | Smaller |
smartArtFormat.shapeStyles.gallery | Shape Styles |
smartArtFormat.shapeStyles.fill | Shape Fill |
smartArtFormat.shapeStyles.border | Shape Outline |
smartArtFormat.wordArtStyles.gallery | WordArt Styles |
smartArtFormat.wordArtStyles.color | Text Fill |
smartArtFormat.wordArtStyles.bold | Bold |
smartArtFormat.wordArtStyles.italic | Italic |
smartArtFormat.arrange.bringForward | Bring Forward |
smartArtFormat.arrange.sendBackward | Send Backward |
smartArtFormat.arrange.bringToFront | Bring to Front |
smartArtFormat.arrange.sendToBack | Send to Back |
smartArtFormat.arrange.flipHorizontal | Flip Horizontal |
smartArtFormat.arrange.flipVertical | Flip Vertical |
smartArtFormat.arrange.group | Group |
smartArtFormat.arrange.ungroup | Ungroup |
smartArtFormat.arrange.align | Align |
smartArtFormat.arrange.mergeShapes | Merge Shapes |
smartArtFormat.arrange.crop | Crop |
smartArtFormat.arrange.outlineWidth | Outline width |
smartArtFormat.size.width | Width |
smartArtFormat.size.height | Height |
Toolbar buttons (ribbon.hiddenButtons)
| Id | What it removes |
|---|---|
share | Share / collaboration button in the tab row and mobile toolbar. |
broadcast | Broadcast (present online) button. |
export | Export button and the File > Export page. |
undo | Undo button in the quick-access strip. |
redo | Redo button in the quick-access strip. |
record | Record button and the Record ribbon tab. |
notes | Notes toggle in the status bar. |
fullscreen | Full-screen toggle. |
zoom | The zoom cluster (zoom in, zoom out, fit). |
navigation | The previous / next slide cluster. |
mergeShapes | The Merge Shapes dropdown (Union, Combine, Fragment, Intersect, Subtract) in the Home tab Arrange group. |
crop | Both picture Crop buttons (crop mode, aspect ratio, Fill, Fit): Home > Arrange, Picture Format > Size. |
Options pages (options.hiddenPages)
| Id | Page |
|---|---|
general | General |
proofing | Proofing |
save | Save |
language | Language |
accessibility | Accessibility |
advanced | Advanced |
ribbon | Customize Ribbon |
quickAccess | Quick Access Toolbar |
addIns | Add-ins |
trust | Trust Center |
ai | AI |
Options sections (options.hiddenSections)
| Id | Section |
|---|---|
general.userInterface | User Interface options |
general.personalize | Personalize your copy of the viewer |
general.appearance | Viewer theme |
general.fonts | Fonts |
general.startup | Start up options |
proofing.autoCorrect | AutoCorrect options |
proofing.spellingOffice | When correcting spelling |
proofing.spellingViewer | When correcting spelling in the viewer |
save.savePresentations | Save presentations |
save.cache | Cache Settings |
accessibility.assistant | Make your document accessible to others |
accessibility.feedback | Feedback options |
accessibility.display | Application display options |
advanced.editing | Editing options |
advanced.cutCopyPaste | Cut, copy, and paste |
advanced.imageQuality | Image Size and Quality |
advanced.chart | Chart |
advanced.display | Display |
advanced.slideShow | Slide Show |
advanced.print | |
advanced.pdf | Save as PDF |
ribbon.shortcutReference | Keyboard Shortcuts |
quickAccess.quickAccessOptions | Quick Access Toolbar options |
trust.trustSettings | Security settings |
Settings (options.hiddenSettings, options.locked, options.defaults)
| Id | Type | Built-in default | Label |
|---|---|---|---|
general.displayOptimization | string | 'appearance' | When using multiple displays |
general.showMiniToolbar | boolean | true | Show Mini Toolbar on selection |
general.enableLivePreview | boolean | true | Enable Live Preview |
general.collapseRibbonAutomatically | boolean | false | Collapse the ribbon automatically |
general.collapseSearchByDefault | boolean | false | Collapse the search box by default |
general.screenTipStyle | string | 'descriptions' | ScreenTip style |
general.userName | string | '' | User name |
general.userInitials | string | '' | Initials |
general.showStartScreen | boolean | true | Show the Start screen when this application starts |
general.enableCustomFontUpload | boolean | false | Let me add font files to this session |
proofing.autoCorrectTwoInitialCapitals | boolean | true | Correct TWo INitial CApitals |
proofing.autoCorrectCapitalizeFirstLetter | boolean | true | Capitalize first letter of sentences |
proofing.autoCorrectCapitalizeDayNames | boolean | true | Capitalize names of days |
proofing.autoCorrectSmartQuotes | boolean | true | Replace straight quotes with smart quotes |
proofing.autoCorrectHyphensToDash | boolean | true | Replace hyphens (--) with dash |
proofing.autoCorrectFractions | boolean | true | Replace fractions (1/2) with fraction characters (½) |
proofing.autoCorrectOrdinals | boolean | true | Replace ordinals (1st) with superscript |
proofing.ignoreUppercase | boolean | true | Ignore words in UPPERCASE |
proofing.ignoreWordsWithNumbers | boolean | true | Ignore words that contain numbers |
proofing.ignoreInternetAddresses | boolean | true | Ignore Internet and file addresses |
proofing.flagRepeatedWords | boolean | true | Flag repeated words |
proofing.checkSpellingAsYouType | boolean | false | Check spelling as you type |
proofing.hideSpellingErrors | boolean | false | Hide spelling errors |
save.autoSave | boolean | true | Save changes automatically (AutoSave) |
save.autoRecoverIntervalMinutes | number | 2 | Save AutoRecover information every |
save.keepLastAutoRecoveredVersion | boolean | true | Keep the last AutoRecovered version if I close without saving |
save.defaultExportFormat | string | 'pptx' | Save files in this format |
save.cacheRetentionDays | number | 14 | Days to keep files in the local document cache |
save.clearCacheOnClose | boolean | false | Delete files from the local document cache when they are closed |
accessibility.subtitleLanguage | string | 'auto' | (not shown in the dialog) |
accessibility.showAccessibilityStatus | boolean | true | Show accessibility status in the status bar |
accessibility.feedbackWithSound | boolean | false | Provide feedback with sound |
accessibility.soundScheme | string | 'modern' | Sound Scheme |
accessibility.showShortcutKeysInScreenTips | boolean | true | Show shortcut keys in ScreenTips |
accessibility.reducedMotion | boolean | false | Reduced motion |
advanced.autoSelectEntireWord | boolean | true | When selecting, automatically select entire word |
advanced.allowTextDragAndDrop | boolean | true | Allow text to be dragged and dropped |
advanced.maximumUndoSteps | number | 100 | Maximum number of undos |
advanced.useSmartCutAndPaste | boolean | true | Use smart cut and paste |
advanced.showPasteOptionsButton | boolean | true | Show Paste Options button when content is pasted |
advanced.imageDefaultResolution | string | 'highFidelity' | Default resolution |
advanced.doNotCompressImages | boolean | false | Do not compress images in file |
advanced.chartPropertiesFollowDataPoint | boolean | true | Properties follow chart data point |
advanced.recentPresentationsCount | number | 50 | Show this number of Recent Presentations |
advanced.showVerticalRuler | boolean | false | Show rulers |
advanced.showGrid | boolean | false | Show grid |
advanced.snapToGrid | boolean | false | Snap to grid |
advanced.disableHardwareAcceleration | boolean | false | Disable hardware graphics acceleration |
advanced.disable3DRendering | boolean | false | Disable 3D rendering (for performance) |
advanced.pixelateMosaicAnimation | boolean | false | Show a mosaic effect for Pixelate transitions |
advanced.openDocumentsView | string | 'savedView' | Open all documents using this view |
advanced.slideShowShowMenuOnRightClick | boolean | true | Show menu on right mouse click |
advanced.slideShowShowPopupToolbar | boolean | true | Show popup toolbar |
advanced.slideShowPromptKeepInkAnnotations | boolean | true | Prompt to keep ink annotations when exiting |
advanced.slideShowEndWithBlackSlide | boolean | true | End with black slide |
advanced.printInBackground | boolean | true | Print in background |
advanced.printHighQuality | boolean | false | High quality |
advanced.printUseMostRecentSettings | boolean | true | Use the most recently used print settings |
advanced.printWhat | string | 'slides' | Print what |
advanced.printColorMode | string | 'color' | Color/grayscale |
advanced.printHiddenSlides | boolean | false | Print hidden slides |
advanced.printScaleToFit | boolean | false | Scale to fit paper |
advanced.printFrameSlides | boolean | false | Frame slides |
advanced.pdfIncludeHiddenSlides | boolean | false | Include hidden slides |
advanced.pdfSlidesAsPictures | boolean | false | Save slides as pictures |
quickAccess.visible | boolean | true | Show Quick Access Toolbar |
quickAccess.position | string | 'above' | Toolbar Position |
quickAccess.showCommandLabels | boolean | false | Always show command labels |
trust.openInProtectedView | boolean | false | Open presentations in Protected View |
trust.allowExternalContent | boolean | false | Allow external content (remote images and media) |
trust.allowFontDownloads | boolean | true | Download fonts that are not installed or embedded (Google Fonts) |
trust.confirmExternalHyperlinks | boolean | true | Confirm before opening external hyperlinks |
File tab pages (backstage.hiddenPages)
| Id | Page |
|---|---|
home | Home |
new | New |
open | Open |
info | Info |
save | Save |
saveAs | Save As |
print | |
share | Share |
export | Export |
close | Close |
account | Account |
options | Options |
File tab cards (backstage.hiddenCards)
| Id | Card |
|---|---|
protect | Protect Presentation |
inspect | Inspect Presentation |
embedFonts | Embed Fonts |
signatures | Digital Signatures |
versionHistory | Version History |
saveAsPptx | PowerPoint Presentation |
saveAsPpsx | PowerPoint Show |
saveAsPptm | Macro-Enabled Presentation |
saveAsPpt | PowerPoint 97-2003 Presentation |
pdf | Create PDF |
png | Export current slide |
video | Create a Video |
gif | Create an Animated GIF |
json | Export as JSON |
copyImage | Copy as Image |
print | Print Presentation |
share | Share with People |
Host context-menu commands
All five bindings accept contextMenu.extraElementCommands and contextMenu.extraCanvasCommands. These arrays contain { id, label, group?, disabled?, onSelect } commands. Labels are plain text supplied by the host. group is "top" (the default) or "bottom", separated from the built-in commands. IDs are isolated from built-in IDs; duplicate host IDs keep the first entry.
Element callbacks receive { slideIndex, elementIds }; canvas callbacks receive { slideIndex }. slideIndex is zero-based. Context is an immutable snapshot of the effective selection when the command was offered. disabled accepts a boolean or a predicate receiving that context. A disabled command cannot run. The menu closes before onSelect runs.
viewer.setCustomization({
contextMenu: {
extraElementCommands: [
{
id: 'send-to-chat',
label: 'Send to chat',
disabled: ({ elementIds }) => elementIds.length === 0,
onSelect: ({ slideIndex, elementIds }) => sendToChat(slideIndex, elementIds),
},
],
extraCanvasCommands: [
{
id: 'send-slide',
label: 'Send slide',
group: 'bottom',
onSelect: ({ slideIndex }) => sendSlide(slideIndex),
},
],
},
});Use the customization prop/input/option or setCustomization / updateCustomization to replace commands live. Callbacks remain in memory and are not persisted in viewer settings. Disabling the corresponding menu also removes host commands.
Element context menu (contextMenu.hiddenElementCommands)
| Id | Entry |
|---|---|
copy | Copy |
cut | Cut |
paste | Paste |
duplicate | Duplicate |
edit-text | Edit Text |
edit-points | Edit Points |
bring-forward | Bring Forward |
send-backward | Send Backward |
bring-front | Bring to Front |
send-back | Send to Back |
ai-ask | Ask AI about this |
ai-fix | Fix with AI |
comment | Add Comment |
hyperlink | Edit Hyperlink |
table-insert-row-above | Insert Row Above |
table-insert-row-below | Insert Row Below |
table-delete-row | Delete Row |
table-insert-col-left | Insert Column Left |
table-insert-col-right | Insert Column Right |
table-delete-col | Delete Column |
table-merge-selected | Merge Selected Cells |
table-merge-right | Merge Right |
table-merge-down | Merge down |
table-split | Split Cell |
group | Group |
ungroup | Ungroup |
crop | Crop |
merge-union | Union Shapes |
merge-combine | Combine Shapes |
merge-fragment | Fragment Shapes |
merge-intersect | Intersect Shapes |
merge-subtract | Subtract Shapes |
save-as-picture | Save as Picture... |
edit-alt-text | Edit Alt Text... |
size-and-position | Size and Position... |
format-shape | Format Shape... |
format-chart-element | Format Chart Area... |
delete | Delete |
Empty-canvas context menu (contextMenu.hiddenCanvasCommands)
| Id | Entry |
|---|---|
paste | Paste |
layout | Layout |
reset-slide | Reset Slide |
format-background | Format Background... |
grid-and-guides | Grid and Guides |
ruler | Ruler |
Edit Points menu (contextMenu.hiddenEditPointsCommands)
| Id | Entry |
|---|---|
add-point | Add Point |
delete-point | Delete Point |
delete-segment | Delete Segment |
open-path | Open Path |
close-path | Close Path |
smooth-point | Smooth Point |
straight-point | Straight Point |
corner-point | Corner Point |
straight-segment | Straight Segment |
curved-segment | Curved Segment |
exit | Exit Edit Points |
Editor shortcuts (keyboard.disabled, keyboard.remap)
| Id | Command |
|---|---|
undo | Undo (Ctrl/Cmd+Z). |
redo | Redo (Ctrl/Cmd+Y, Ctrl/Cmd+Shift+Z). |
copy | Copy the selection (Ctrl/Cmd+C). |
cut | Cut the selection (Ctrl/Cmd+X). |
paste | Paste (Ctrl/Cmd+V). |
duplicate | Duplicate the selection (Ctrl/Cmd+D). |
delete | Delete the selection (Delete, Backspace). |
selectAll | Select every element on the slide (Ctrl/Cmd+A). |
group | Group the selection (Ctrl/Cmd+G). |
ungroup | Ungroup (Ctrl/Cmd+Shift+G). |
nudge | Move the selection with the arrow keys (disable only; not remappable). |
prevSlide | Previous slide (ArrowLeft with nothing selected). |
nextSlide | Next slide (ArrowRight with nothing selected). |
escape | Escape: leave the current mode (disable only; not remappable). |
find | Find (Ctrl/Cmd+F). |
findReplace | Find and replace (Ctrl/Cmd+H). |
toggleShortcuts | Keyboard-shortcut reference (?, Ctrl/Cmd+/). |
alignLeft | Align text left (Ctrl/Cmd+L). |
alignCenter | Center text (Ctrl/Cmd+E). |
alignRight | Align text right (Ctrl/Cmd+R). |
alignJustify | Justify text (Ctrl/Cmd+J). |
increaseFontSize | Increase font size (Ctrl/Cmd+Shift+>). |
decreaseFontSize | Decrease font size (Ctrl/Cmd+Shift+<). |
copyFormat | Copy formatting (Ctrl/Cmd+Shift+C). |
pasteFormat | Paste formatting (Ctrl/Cmd+Shift+V). |
newSlide | New slide (Ctrl/Cmd+M). |
hyperlink | Insert or edit a hyperlink (Ctrl/Cmd+K). |
clearFormatting | Clear character formatting (Ctrl/Cmd+Space). |
cycleSelectionNext | Select the next element (Tab, inside the slide). |
cycleSelectionPrev | Select the previous element (Shift+Tab, inside the slide). |
editText | Edit the text of the selected object (Enter, inside the slide). |
pasteSpecial | Paste Special (Ctrl/Cmd+Alt+V). |
Panels (hiddenPanels)
| Id | Region |
|---|---|
statusBar | The status bar under the canvas (slide counter, zoom, view buttons). |
slidesPane | The slide thumbnail rail on the left. |
inspector | The format / properties inspector on the right. |
notes | The speaker-notes panel under the canvas. |
quickAccessToolbar | The quick-access strip in the title bar (save, undo, redo, ...). |
titleBar | The title bar above the ribbon (file name, quick access, account). |
selectionPane | The Selection Pane and View > Selection Pane. |
findReplace | The Find and Replace panel, Home > Find / Replace and their shortcuts. |
accessibilityPane | The accessibility checker panel, Review > Check Accessibility and Help > Accessibility checker. |
comparePane | The Compare panel and Review > Compare. |
Features (disabledFeatures)
| Id | What it switches off |
|---|---|
ai | The AI assistant: toolbar toggle, chat panel, AI context-menu entries, AI Options page. |
collaboration | Real-time collaboration: Share and Broadcast buttons, dialogs and File pages. |
comments | Commenting: the Add Comment context-menu entry and the Comments groups of Insert and Review. |
presentMode | Slide-show entry points: the Slide Show ribbon tab. |
editPoints | Edit Points: the Edit Points context-menu entry and the point-editing mode it opens. |
Dialogs (hiddenDialogs)
| Id | What it removes |
|---|---|
options | File > Options (the Settings dialog) and the File tab entry that opens it. |
share | The Share dialog, its toolbar button, File > Share page and card. |
broadcast | The Broadcast dialog and its button. |
print | The Print dialog, File > Print page and card. |
export | File > Export page, its cards and the Export button. |
hyperlink | The Insert Hyperlink dialog: Insert > Link, the Link menu entry and its shortcut. |
equation | The Equation editor and Insert > Equation. |
pasteSpecial | The Paste Special dialog and its shortcut. |
slideTemplates | The slide template gallery and its entry at the end of the Home > New Slide menu. |
passwordProtection | The password protection dialog and the File > Info Protect card. |
signatures | The digital signatures dialog and the File > Info Signatures card. |
Export formats (hiddenExportFormats)
| Id | Format |
|---|---|
pdf | Export to PDF. |
png | Export the current slide as PNG. |
video | Export the deck as a video. |
gif | Export the deck as an animated GIF. |
json | Export the parsed deck as JSON. |
copyImage | Copy the current slide to the clipboard as an image. |
Capabilities (capabilities)
| Id | What false removes |
|---|---|
edit | Editing. false opens the deck read-only whatever the edit prop says. |
export | Exporting: the same as hiding the export dialog. |
print | Printing: the same as hiding the print dialog. |
share | Sharing: hides the share and broadcast dialogs. |
copy | Copying content out: Copy, Cut, Save as Picture, their shortcuts and Copy as image. |
present | Presenting: the same as disabling the presentMode feature. |
comment | Commenting: the same as disabling the comments feature. |
Replaceable regions (regions)
| Id | Region |
|---|---|
inspector | The right-hand inspector column (the pane, not its open/close state). |
slidesPane | The slide thumbnail rail on the left. |
notes | The speaker-notes panel under the canvas. |
statusBar | The status bar under the canvas. |
dialog.options | The body of File > Options (the Settings dialog). Context adds options, setOption, resetOptions. |
dialog.share | The body of the Share dialog. |
dialog.broadcast | The body of the Broadcast dialog. |
dialog.print | The body of the Print dialog. |
backstage.home | The body of File > Home. |
backstage.new | The body of File > New. |
backstage.open | The body of File > Open. |
backstage.info | The body of File > Info. |
backstage.save | The body of File > Save. |
backstage.saveAs | The body of File > Save As. |
backstage.print | The body of File > Print. |
backstage.share | The body of File > Share. |
backstage.export | The body of File > Export. |
backstage.close | The body of File > Close. |
backstage.account | The body of File > Account. |
backstage.options | The body of File > Options. |
Drawing tools (hiddenDrawingTools)
| Id | Tool |
|---|---|
freeformShape | Freeform: Shape |
curve | Curve |