Skip to content

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:

ts
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:

ts
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:

ts
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 toField
Hide ribbon tabs, groups, controls and toolbar buttonsribbon.hiddenTabs, ribbon.hiddenGroups, ribbon.hiddenButtons
Add your own ribbon tabsthe ribbonAddIns prop (below)
Hide, lock or set defaults for File > Options pages, sections and settingsoptions.hiddenPages, options.hiddenSections, options.hiddenSettings, options.locked, options.defaults
Remove File > Options entirelyhiddenDialogs: ['options']
Replace File > Options with your own Settings viewregions['dialog.options']
Hide File tab pages and cardsbackstage.hiddenPages, backstage.hiddenCards
Add your own File tab pagesbackstage.extraPages
Replace a File tab pageregions['backstage.<page>']
Hide or add context-menu commandscontextMenu.*
Disable or remap shortcutskeyboard.*
Hide panels (inspector, slide rail, notes, status bar, title bar, Selection Pane, Find and Replace, ...)hiddenPanels
Replace the inspector, slide rail, notes or status barregions.inspector, regions.slidesPane, regions.notes, regions.statusBar
Hide inspector cardsinspector.hiddenCards
Switch off AI, collaboration, comments, present mode, Edit PointsdisabledFeatures
Remove dialogs and every entry point that opens themhiddenDialogs
Replace the Share, Broadcast or Print dialog bodyregions['dialog.share'], regions['dialog.broadcast'], regions['dialog.print']
Remove export formatshiddenExportFormats
Remove drawing toolshiddenDrawingTools
Make the deck read-only, or forbid export, print, share, copy, present or commentcapabilities

Concepts ​

Hide, lock, default ​

There are three different things you can do to a setting in File > Options, and they compose:

You wantUse
The user never sees the settingoptions.hiddenSettings: ['general.userInitials']
The setting has a fixed value the user cannot changeoptions.locked: { 'general.userName': 'Ada' } (renders read-only)
Both: a fixed value and no control at allput the id in locked and hiddenSettings
A different starting value the user may still changeoptions.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 an ai config.
  • 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.
  • hiddenExportFormats removes 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: findReplace takes Home > Find / Replace and Ctrl+F / Ctrl+H with it, selectionPane View > Selection Pane, accessibilityPane Review > Check Accessibility and Help > Accessibility checker, comparePane Review > Compare, and notes the Notes buttons.
  • Hiding a dialog does the same for its entry points: hyperlink removes Insert > Link, the Link menu entry and Ctrl+K; equation Insert > Equation; pasteSpecial its shortcut; slideTemplates the Slide Templates entry of Home > New Slide; passwordProtection and signatures their File > Info cards.
  • capabilities expand 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 customization object, 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.

ts
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:

tsx
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. label is 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 with items is 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.
  • hiddenActions and ribbon.hiddenTabs do 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):

MethodEffect
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 ​

tsx
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} />
		</>
	);
}
vue
<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>
ts
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'],
	};
}
svelte
<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} />
ts
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:

ts
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 ​

RegionWhat you replaceWhat the viewer keeps
inspectorThe inspector paneIts column, width, resize handle, open/closed state and mobile sheet
slidesPaneThe slide thumbnail railIts width and collapse state
notesThe speaker-notes panelIts height, resize handle and collapse state
statusBarThe status barIts row under the canvas
dialog.optionsThe body of File > Options (the Settings dialog)The dialog frame: backdrop, title, close button, Escape
dialog.share, dialog.broadcast, dialog.printThe body of that dialogThe 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 its context property, then assigns context again whenever the context changes. Register the element yourself before the region first appears.
  • A custom element spec { element: 'acme-settings', properties: { tenant } }. The same, with properties assigned 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 (width and height are 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 through setOption.

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:

FieldMeaning
regionThe region id (inspector, dialog.options, backstage.host.<id>, ...)
viewerThe 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'
canEditfalse when the deck is read-only (edit prop, capabilities.edit or protection)
activeSlideIndex, slideCountThe active slide (zero-based) and the slide count
selectedElementIdsThe selected elements on the active slide (empty: nothing selected)
localeThe 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:

FieldMeaning
optionsThe 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:

tsx
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 } }} />;
ts
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() };
};
ts
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();
			},
		};
	};
}
ts
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) };
};
ts
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:

ts
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.

ts
const portal: ViewerCustomization = {
	capabilities: { edit: false, export: false, print: false, copy: false },
};
Capabilityfalse means
editThe deck opens read-only, whatever the edit prop says (canEdit, editable).
exportNo File > Export page, Export button or export cards.
printNo Print dialog, File > Print page or Print card.
shareNo Share or Broadcast dialogs, buttons, pages or cards.
copyNo Copy, Cut or Save as Picture (menus, ribbon, shortcuts) and no Copy as image.
presentNo Slide Show tab or F5 / Shift+F5 (the presentMode feature).
commentNo 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.

ts
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 ​

ts
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:

ts
viewer.lockSetting('general.userName', currentUser.displayName);
viewer.lockSetting('general.userInitials', currentUser.initials, true); // locked and hidden

Locale 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:

ts
const pinned: ViewerCustomization = {
	options: {
		hiddenPages: ['language'], // the display-language picker
		hiddenSections: ['general.appearance'], // the viewer theme picker
	},
};

Remove AI and collaboration ​

ts
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:

ts
viewer.setFeatureEnabled('ai', tenant.hasAiAddOn);

Trim the ribbon to a minimal set ​

ts
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 ​

ts
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:

ts
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 ​

ts
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. keyboard covers the editor keymap. The only show key it affects is F5 / Shift+F5, through the presentMode feature.
  • The keyboard-shortcut reference (the ? overlay and Options > Customize Ribbon > Keyboard Shortcuts) lists the built-in chords, not your remaps. Hide it with keyboard.disabled: ['toggleShortcuts'] and options.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 with regions.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 ribbonAddIns instead.
  • 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.
  • presentMode removes 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 its customization option is the initial value only; change it at runtime with setCustomization and the other helpers. A change rebuilds the chrome (as setLocale does), which returns the ribbon to its first tab.
  • React's headless useViewerBuildingBlocks composition does not take a customization; use the PowerPointViewer component.

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) ​

IdTab
fileFile
homeHome
insertInsert
drawDraw
designDesign
transitionsTransitions
animationsAnimations
slideShowSlide Show
recordRecord
reviewReview
viewView
helpHelp
shapeFormatShape Format
pictureFormatPicture Format
tableDesignTable Design
tableLayoutTable Layout
chartDesignChart Design
chartFormatChart Format
smartArtDesignSmartArt Design
videoFormatVideo Format
audioFormatAudio Format
playbackPlayback
smartArtFormatSmartArt Format

Ribbon groups (ribbon.hiddenGroups) ​

IdGroup
home.clipboardClipboard
home.slidesSlides
home.fontFont
home.paragraphParagraph
home.drawingDrawing
home.arrangeArrange (legacy group alias)
home.editingEditing
home.addInsAdd-ins
insert.slidesSlides
insert.tablesTables
insert.imagesImages
insert.cameraCamera
insert.illustrationsIllustrations
insert.formsForms
insert.addInsAdd-ins
insert.linksLinks
insert.commentsComments
insert.textText
insert.symbolsSymbols
insert.mediaMedia
draw.toolsDrawing Tools
draw.selectionSelect
draw.pensPen presets
draw.convertConvert
draw.guidesGuides
draw.replayInk Replay
design.themesThemes
design.variantsVariants
design.customizeCustomize
design.designerDesigner
transitions.previewPreview
transitions.transitionToThisSlideTransition to This Slide
transitions.timingTiming
animations.previewPreview
animations.animationAnimation
animations.motionPathMotion Paths
animations.advancedAnimationAdvanced Animation
animations.timingTiming
slideShow.startSlideShowStart Slide Show
slideShow.presentPresent
slideShow.setUpSet Up
slideShow.captionsCaptions & Subtitles
record.cameraCamera
record.recordRecord
record.manageManage
record.helpHelp
review.proofingProofing
review.accessibilityAccessibility
review.languageLanguage
review.commentsComments
review.compareCompare
review.protectProtect
review.inkInk
view.presentationViewsPresentation Views
view.masterViewsMaster Views
view.showShow
view.zoomZoom
view.windowWindow
help.helpHelp
shapeFormat.shapeStylesShape Styles
shapeFormat.wordArtStylesWordArt Styles
shapeFormat.arrangeArrange
pictureFormat.adjustAdjust
pictureFormat.pictureStylesPicture Styles
pictureFormat.sizeSize
pictureFormat.accessibilityAlt Text
pictureFormat.arrangeArrange
tableDesign.tableStylesTable Styles
tableLayout.tableTable
tableLayout.rowsColumnsRows & Columns
tableLayout.mergeMerge
tableLayout.cellSizeCell Size
tableLayout.alignmentAlignment
tableLayout.tableSizeTable Size
tableLayout.arrangeArrange
chartDesign.chartLayoutsChart Layouts
chartDesign.chartStylesChart Styles
chartFormat.currentSelectionCurrent Selection
smartArtDesign.createGraphicCreate Graphic
smartArtDesign.layoutsLayouts
smartArtDesign.smartArtStylesSmartArt Styles
smartArtDesign.resetReset
videoFormat.posterPoster Frame
videoFormat.adjustAdjust
videoFormat.pictureStylesVideo Styles
videoFormat.arrangeArrange
videoFormat.sizeSize
audioFormat.adjustAdjust
audioFormat.pictureStylesPicture Styles
audioFormat.arrangeArrange
audioFormat.sizeSize
playback.bookmarksBookmarks
playback.editingEditing
playback.optionsPlayback
smartArtFormat.shapesShapes
smartArtFormat.shapeStylesShape Styles
smartArtFormat.wordArtStylesWordArt Styles
smartArtFormat.arrangeArrange
smartArtFormat.sizeSize

Ribbon controls (ribbon.hiddenButtons) ​

IdControl
home.clipboard.pastePaste
home.clipboard.cutCut
home.clipboard.copyCopy
home.clipboard.formatPainterFormat Painter
home.slides.newSlideNew Slide
home.slides.layoutLayout
home.slides.resetReset
home.slides.sectionSection
home.slides.slideTemplatesSlide templates (New Slide menu entry)
home.font.fontFamilyFont
home.font.fontSizeFont Size
home.font.increaseFontSizeIncrease Font Size
home.font.decreaseFontSizeDecrease Font Size
home.font.clearFormattingClear All Formatting
home.font.boldBold
home.font.italicItalic
home.font.underlineUnderline
home.font.strikethroughStrikethrough
home.font.shadowText Shadow
home.font.characterSpacingCharacter Spacing
home.font.changeCaseChange Case
home.font.fontColorFont Color
home.font.highlightColorText Highlight Color
home.font.superscriptSuperscript
home.font.subscriptSubscript
home.paragraph.bulletsBullets (toggle and gallery)
home.paragraph.numberingNumbering (toggle and gallery)
home.paragraph.decreaseIndentDecrease List Level
home.paragraph.increaseIndentIncrease List Level
home.paragraph.lineSpacingLine Spacing
home.paragraph.alignLeftAlign Left
home.paragraph.alignCenterCenter
home.paragraph.alignRightAlign Right
home.paragraph.justifyJustify
home.paragraph.columnsColumns
home.paragraph.textDirectionText Direction
home.paragraph.alignTextAlign Text
home.drawing.shapesShapes
home.drawing.arrangeArrange
home.drawing.positionSizePosition & Size
home.drawing.selectionPaneSelection Pane
home.drawing.quickStylesQuick Styles gallery
home.drawing.shapeFillShape Fill
home.drawing.shapeOutlineShape Outline
home.drawing.shapeEffectsShape Effects gallery
home.drawing.rotateRightRotate Right 90°
home.drawing.rotateLeftRotate Left 90°
home.arrange.bringForwardBring Forward
home.arrange.sendBackwardSend Backward
home.arrange.bringToFrontBring to Front
home.arrange.sendToBackSend to Back
home.arrange.flipHorizontalFlip Horizontal
home.arrange.flipVerticalFlip Vertical
home.arrange.groupGroup
home.arrange.ungroupUngroup
home.arrange.alignAlign and Distribute (alias)
home.arrange.mergeShapesMerge Shapes
home.arrange.cropCrop
home.arrange.outlineWidthOutline width
home.arrange.duplicateDuplicate
home.arrange.deleteDelete
home.arrange.align-leftAlign Left
home.arrange.align-centerAlign Center
home.arrange.align-rightAlign Right
home.arrange.align-topAlign Top
home.arrange.align-middleAlign Middle
home.arrange.align-bottomAlign Bottom
home.arrange.distribute-horizontalDistribute Horizontally
home.arrange.distribute-verticalDistribute Vertically
home.editing.findFind
home.editing.replaceReplace
home.editing.selectSelect
home.addIns.addInsAdd-ins
insert.slides.newSlideNew Slide
insert.slides.reuseSlidesReuse Slides
insert.tables.tableTable
insert.images.picturesPictures
insert.images.screenshotScreenshot
insert.images.photoAlbumPhoto Album
insert.camera.cameoCameo
insert.illustrations.shapesShapes
insert.illustrations.iconsIcons
insert.illustrations.threeDModels3D Models
insert.illustrations.smartArtSmartArt
insert.illustrations.chartChart
insert.forms.formsForms
insert.addIns.getAddInsGet Add-ins
insert.addIns.myAddInsMy Add-ins
insert.links.zoomZoom
insert.links.linkLink
insert.links.actionAction button
insert.comments.commentComment
insert.text.textBoxText Box
insert.text.headerFooterHeader & Footer
insert.text.wordArtWordArt
insert.text.dateTimeDate & Time
insert.text.slideNumberSlide Number
insert.text.objectObject
insert.text.fieldDate & Time and Slide Number (deprecated alias: use dateTime and slideNumber)
insert.symbols.equationEquation
insert.symbols.symbolSymbol
insert.media.mediaVideo
insert.media.audioAudio
insert.media.screenRecordingScreen Recording
draw.tools.selectSelect
draw.tools.penPen
draw.tools.highlighterHighlighter
draw.tools.freeformFreeform
draw.tools.eraserEraser
draw.tools.penColorPen colour
draw.tools.penWidthPen width
draw.selection.lassoLasso Select
draw.pens.typePen type
draw.pens.addAdd Pen
draw.pens.presetsPen presets
draw.pens.removeRemove preset
draw.convert.inkToShapeInk to Shape
draw.convert.inkToMathInk to Math
draw.guides.rulerRuler
draw.guides.angleRuler angle
draw.replay.startInk Replay
draw.replay.playPlay or pause
draw.replay.seekReplay position
draw.replay.closeClose replay
design.themes.galleryThemes (inline gallery)
design.themes.browseThemesThemes gallery
design.themes.editThemeEdit theme
design.variants.galleryVariants (inline gallery)
design.variants.colorsVariants: Colors gallery
design.variants.fontsVariants: Fonts gallery
design.variants.effectsVariants: Effects gallery
design.variants.backgroundStylesVariants: Background Styles gallery
design.customize.slideSizeSlide Size
design.customize.formatBackgroundFormat Background
design.designer.designIdeasDesign Ideas
transitions.preview.previewPreview
transitions.transitionToThisSlide.galleryTransition gallery
transitions.transitionToThisSlide.effectOptionsEffect Options
transitions.timing.soundSound
transitions.timing.durationDuration
transitions.timing.applyToAllApply To All
transitions.timing.advanceOnClickOn Mouse Click
transitions.timing.advanceAfterAfter
animations.preview.previewPreview
animations.animation.galleryAnimation gallery
animations.animation.effectOptionsEffect Options
animations.motionPath.galleryMotion path gallery
animations.advancedAnimation.addAnimationAdd Animation
animations.advancedAnimation.animationPaneAnimation Pane
animations.advancedAnimation.triggerTrigger
animations.advancedAnimation.animationPainterAnimation Painter
animations.advancedAnimation.removeRemove animation
animations.timing.startStart
animations.timing.durationDuration
animations.timing.delayDelay
animations.timing.reorderReorder
slideShow.startSlideShow.fromBeginningFrom Beginning
slideShow.startSlideShow.fromCurrentFrom Current Slide
slideShow.startSlideShow.customShowCustom Slide Show
slideShow.present.presenterViewPresenter View
slideShow.present.broadcastPresent Online
slideShow.setUp.setUpSlideShowSet Up Slide Show
slideShow.setUp.hideSlideHide Slide
slideShow.setUp.rehearseTimingsRehearse Timings
slideShow.setUp.recordRecord
slideShow.setUp.rehearseWithCoachRehearse with Coach
slideShow.captions.subtitlesAlways Use Subtitles
slideShow.captions.subtitleSettingsSubtitle Settings
record.camera.cameoCameo
record.record.fromBeginningFrom Beginning
record.record.fromCurrentFrom Current Slide
record.manage.clearClear
record.manage.resetReset to Cameo
record.help.learnMoreLearn more
review.proofing.spellingSpelling
review.proofing.thesaurusThesaurus
review.accessibility.checkCheck Accessibility
review.language.translateTranslate
review.language.languageLanguage
review.comments.newCommentNew Comment
review.comments.deleteDelete
review.comments.deleteSlideDelete Slide Comments
review.comments.deleteAllDelete All Comments
review.comments.previousPrevious
review.comments.nextNext
review.comments.showCommentsShow Comments
review.compare.compareCompare
review.compare.markAllReadMark all read
review.protect.readOnlyRead-only
review.protect.restrictPermissionRestrict Permission
review.ink.hideInkHide Ink
view.presentationViews.normalNormal
view.presentationViews.outlineOutline View
view.presentationViews.slideSorterSlide Sorter
view.presentationViews.notesPageNotes Page
view.presentationViews.readingViewReading View
view.masterViews.slideMasterSlide Master
view.masterViews.handoutMasterHandout Master
view.masterViews.notesMasterNotes Master
view.show.rulerRuler
view.show.gridlinesGridlines
view.show.guidesGuides
view.show.snapToGridSnap to Grid
view.show.snapToShapeSnap to Shape
view.show.addGuideAdd horizontal / vertical guide
view.show.selectionPaneSelection Pane
view.show.eyedropperEyedropper
view.show.notesNotes
view.zoom.zoomZoom
view.zoom.fitToWindowFit to Window
view.window.templateEditingEdit template elements
view.window.macrosMacros
help.help.optionsOptions
help.help.keyboardShortcutsKeyboard shortcuts
help.help.accessibilityAccessibility checker
shapeFormat.shapeStyles.galleryShape Styles gallery
shapeFormat.shapeStyles.shapeEffectsShape Effects gallery
shapeFormat.wordArtStyles.galleryWordArt Styles gallery
shapeFormat.arrange.rotateRightRotate Right 90°
shapeFormat.arrange.rotateLeftRotate Left 90°
shapeFormat.arrange.selectionPaneSelection Pane
pictureFormat.adjust.correctionsCorrections gallery
pictureFormat.adjust.colorColor gallery
pictureFormat.adjust.artisticEffectsArtistic Effects gallery
pictureFormat.adjust.removeBackgroundRemove Background
pictureFormat.adjust.compressCompress Pictures
pictureFormat.adjust.changePictureChange Picture
pictureFormat.adjust.resetPictureReset Picture
pictureFormat.adjust.resetSizeReset Picture & Size
pictureFormat.pictureStyles.galleryPicture Styles gallery
pictureFormat.pictureStyles.pictureEffectsPicture Effects gallery
pictureFormat.pictureStyles.graphicsFillGraphics Fill gallery
pictureFormat.pictureStyles.borderPicture Border
pictureFormat.pictureStyles.layoutPicture Layout
pictureFormat.size.cropCrop
pictureFormat.size.cropToShapeCrop to Shape
pictureFormat.accessibility.altTextAlt Text
pictureFormat.arrange.rotateRightRotate Right 90°
pictureFormat.arrange.rotateLeftRotate Left 90°
pictureFormat.arrange.selectionPaneSelection Pane
tableDesign.tableStyles.galleryTable Styles gallery
tableLayout.table.selectSelect
tableLayout.table.viewGridlinesView Gridlines
tableLayout.rowsColumns.deleteRowsDelete Rows
tableLayout.rowsColumns.deleteColumnsDelete Columns
tableLayout.rowsColumns.insertAboveInsert Above
tableLayout.rowsColumns.insertBelowInsert Below
tableLayout.rowsColumns.insertLeftInsert Left
tableLayout.rowsColumns.insertRightInsert Right
tableLayout.merge.mergeCellsMerge Cells
tableLayout.merge.splitCellsSplit Cells
tableLayout.cellSize.distributeRowsDistribute Rows
tableLayout.cellSize.distributeColumnsDistribute Columns
tableLayout.alignment.alignLeftAlign Left
tableLayout.alignment.alignCenterCenter
tableLayout.alignment.alignRightAlign Right
tableLayout.alignment.alignTopAlign Top
tableLayout.alignment.alignMiddleCenter Vertically
tableLayout.alignment.alignBottomAlign Bottom
tableLayout.alignment.textDirectionText Direction
tableLayout.alignment.cellMarginsCell Margins
tableLayout.tableSize.sizeTable Size
tableLayout.arrange.arrangeArrange
chartDesign.chartLayouts.quickLayoutQuick Layout gallery
chartDesign.chartStyles.changeColorsChange Colors gallery
chartDesign.chartStyles.galleryChart Styles gallery
chartFormat.currentSelection.chartElementsChart Elements
chartFormat.currentSelection.formatSelectionFormat Selection
chartFormat.currentSelection.resetToMatchStyleReset to Match Style
smartArtDesign.createGraphic.addShapeAdd Shape
smartArtDesign.createGraphic.addShapeBeforeAdd Shape Before
smartArtDesign.createGraphic.addShapeAboveAdd Shape Above
smartArtDesign.createGraphic.addBulletAdd Bullet
smartArtDesign.createGraphic.textPaneText Pane
smartArtDesign.createGraphic.promotePromote
smartArtDesign.createGraphic.demoteDemote
smartArtDesign.createGraphic.rightToLeftRight to Left
smartArtDesign.createGraphic.moveUpMove Up
smartArtDesign.createGraphic.moveDownMove Down
smartArtDesign.layouts.galleryLayouts gallery
smartArtDesign.smartArtStyles.changeColorsChange Colors gallery
smartArtDesign.smartArtStyles.gallerySmartArt Styles gallery
smartArtDesign.reset.resetGraphicReset Graphic
smartArtDesign.reset.convertConvert
videoFormat.poster.currentCurrent Frame
videoFormat.poster.fileImage from File
videoFormat.poster.resetReset Poster Frame
videoFormat.adjust.correctionsCorrections
videoFormat.adjust.colorColor
videoFormat.pictureStyles.galleryVideo Styles
videoFormat.pictureStyles.shapeVideo Shape
videoFormat.pictureStyles.borderVideo Border
videoFormat.pictureStyles.effectsVideo Effects
videoFormat.arrange.rotateRightRotate Right 90°
videoFormat.size.widthWidth
videoFormat.size.heightHeight
videoFormat.size.cropCrop
audioFormat.adjust.correctionsCorrections
audioFormat.adjust.colorColor
audioFormat.pictureStyles.galleryPicture Styles
audioFormat.pictureStyles.shapeShape
audioFormat.pictureStyles.borderBorder
audioFormat.pictureStyles.effectsPicture Effects
audioFormat.arrange.rotateRightRotate Right 90°
audioFormat.size.widthWidth
audioFormat.size.heightHeight
playback.bookmarks.addAdd Bookmark
playback.bookmarks.removeRemove Bookmark
playback.editing.trimTrim
playback.editing.fadeInFade In
playback.editing.fadeOutFade Out
playback.options.volumeVolume
playback.options.startStart
playback.options.fullScreenPlay Full Screen
playback.options.hideHide While Not Playing
playback.options.loopLoop until Stopped
playback.options.rewindRewind after Playing
playback.options.acrossPlay Across Slides
smartArtFormat.shapes.shapeChange Shape
smartArtFormat.shapes.largerLarger
smartArtFormat.shapes.smallerSmaller
smartArtFormat.shapeStyles.galleryShape Styles
smartArtFormat.shapeStyles.fillShape Fill
smartArtFormat.shapeStyles.borderShape Outline
smartArtFormat.wordArtStyles.galleryWordArt Styles
smartArtFormat.wordArtStyles.colorText Fill
smartArtFormat.wordArtStyles.boldBold
smartArtFormat.wordArtStyles.italicItalic
smartArtFormat.arrange.bringForwardBring Forward
smartArtFormat.arrange.sendBackwardSend Backward
smartArtFormat.arrange.bringToFrontBring to Front
smartArtFormat.arrange.sendToBackSend to Back
smartArtFormat.arrange.flipHorizontalFlip Horizontal
smartArtFormat.arrange.flipVerticalFlip Vertical
smartArtFormat.arrange.groupGroup
smartArtFormat.arrange.ungroupUngroup
smartArtFormat.arrange.alignAlign
smartArtFormat.arrange.mergeShapesMerge Shapes
smartArtFormat.arrange.cropCrop
smartArtFormat.arrange.outlineWidthOutline width
smartArtFormat.size.widthWidth
smartArtFormat.size.heightHeight

Toolbar buttons (ribbon.hiddenButtons) ​

IdWhat it removes
shareShare / collaboration button in the tab row and mobile toolbar.
broadcastBroadcast (present online) button.
exportExport button and the File > Export page.
undoUndo button in the quick-access strip.
redoRedo button in the quick-access strip.
recordRecord button and the Record ribbon tab.
notesNotes toggle in the status bar.
fullscreenFull-screen toggle.
zoomThe zoom cluster (zoom in, zoom out, fit).
navigationThe previous / next slide cluster.
mergeShapesThe Merge Shapes dropdown (Union, Combine, Fragment, Intersect, Subtract) in the Home tab Arrange group.
cropBoth picture Crop buttons (crop mode, aspect ratio, Fill, Fit): Home > Arrange, Picture Format > Size.

Options pages (options.hiddenPages) ​

IdPage
generalGeneral
proofingProofing
saveSave
languageLanguage
accessibilityAccessibility
advancedAdvanced
ribbonCustomize Ribbon
quickAccessQuick Access Toolbar
addInsAdd-ins
trustTrust Center
aiAI

Options sections (options.hiddenSections) ​

IdSection
general.userInterfaceUser Interface options
general.personalizePersonalize your copy of the viewer
general.appearanceViewer theme
general.fontsFonts
general.startupStart up options
proofing.autoCorrectAutoCorrect options
proofing.spellingOfficeWhen correcting spelling
proofing.spellingViewerWhen correcting spelling in the viewer
save.savePresentationsSave presentations
save.cacheCache Settings
accessibility.assistantMake your document accessible to others
accessibility.feedbackFeedback options
accessibility.displayApplication display options
advanced.editingEditing options
advanced.cutCopyPasteCut, copy, and paste
advanced.imageQualityImage Size and Quality
advanced.chartChart
advanced.displayDisplay
advanced.slideShowSlide Show
advanced.printPrint
advanced.pdfSave as PDF
ribbon.shortcutReferenceKeyboard Shortcuts
quickAccess.quickAccessOptionsQuick Access Toolbar options
trust.trustSettingsSecurity settings

Settings (options.hiddenSettings, options.locked, options.defaults) ​

IdTypeBuilt-in defaultLabel
general.displayOptimizationstring'appearance'When using multiple displays
general.showMiniToolbarbooleantrueShow Mini Toolbar on selection
general.enableLivePreviewbooleantrueEnable Live Preview
general.collapseRibbonAutomaticallybooleanfalseCollapse the ribbon automatically
general.collapseSearchByDefaultbooleanfalseCollapse the search box by default
general.screenTipStylestring'descriptions'ScreenTip style
general.userNamestring''User name
general.userInitialsstring''Initials
general.showStartScreenbooleantrueShow the Start screen when this application starts
general.enableCustomFontUploadbooleanfalseLet me add font files to this session
proofing.autoCorrectTwoInitialCapitalsbooleantrueCorrect TWo INitial CApitals
proofing.autoCorrectCapitalizeFirstLetterbooleantrueCapitalize first letter of sentences
proofing.autoCorrectCapitalizeDayNamesbooleantrueCapitalize names of days
proofing.autoCorrectSmartQuotesbooleantrueReplace straight quotes with smart quotes
proofing.autoCorrectHyphensToDashbooleantrueReplace hyphens (--) with dash
proofing.autoCorrectFractionsbooleantrueReplace fractions (1/2) with fraction characters (½)
proofing.autoCorrectOrdinalsbooleantrueReplace ordinals (1st) with superscript
proofing.ignoreUppercasebooleantrueIgnore words in UPPERCASE
proofing.ignoreWordsWithNumbersbooleantrueIgnore words that contain numbers
proofing.ignoreInternetAddressesbooleantrueIgnore Internet and file addresses
proofing.flagRepeatedWordsbooleantrueFlag repeated words
proofing.checkSpellingAsYouTypebooleanfalseCheck spelling as you type
proofing.hideSpellingErrorsbooleanfalseHide spelling errors
save.autoSavebooleantrueSave changes automatically (AutoSave)
save.autoRecoverIntervalMinutesnumber2Save AutoRecover information every
save.keepLastAutoRecoveredVersionbooleantrueKeep the last AutoRecovered version if I close without saving
save.defaultExportFormatstring'pptx'Save files in this format
save.cacheRetentionDaysnumber14Days to keep files in the local document cache
save.clearCacheOnClosebooleanfalseDelete files from the local document cache when they are closed
accessibility.subtitleLanguagestring'auto'(not shown in the dialog)
accessibility.showAccessibilityStatusbooleantrueShow accessibility status in the status bar
accessibility.feedbackWithSoundbooleanfalseProvide feedback with sound
accessibility.soundSchemestring'modern'Sound Scheme
accessibility.showShortcutKeysInScreenTipsbooleantrueShow shortcut keys in ScreenTips
accessibility.reducedMotionbooleanfalseReduced motion
advanced.autoSelectEntireWordbooleantrueWhen selecting, automatically select entire word
advanced.allowTextDragAndDropbooleantrueAllow text to be dragged and dropped
advanced.maximumUndoStepsnumber100Maximum number of undos
advanced.useSmartCutAndPastebooleantrueUse smart cut and paste
advanced.showPasteOptionsButtonbooleantrueShow Paste Options button when content is pasted
advanced.imageDefaultResolutionstring'highFidelity'Default resolution
advanced.doNotCompressImagesbooleanfalseDo not compress images in file
advanced.chartPropertiesFollowDataPointbooleantrueProperties follow chart data point
advanced.recentPresentationsCountnumber50Show this number of Recent Presentations
advanced.showVerticalRulerbooleanfalseShow rulers
advanced.showGridbooleanfalseShow grid
advanced.snapToGridbooleanfalseSnap to grid
advanced.disableHardwareAccelerationbooleanfalseDisable hardware graphics acceleration
advanced.disable3DRenderingbooleanfalseDisable 3D rendering (for performance)
advanced.pixelateMosaicAnimationbooleanfalseShow a mosaic effect for Pixelate transitions
advanced.openDocumentsViewstring'savedView'Open all documents using this view
advanced.slideShowShowMenuOnRightClickbooleantrueShow menu on right mouse click
advanced.slideShowShowPopupToolbarbooleantrueShow popup toolbar
advanced.slideShowPromptKeepInkAnnotationsbooleantruePrompt to keep ink annotations when exiting
advanced.slideShowEndWithBlackSlidebooleantrueEnd with black slide
advanced.printInBackgroundbooleantruePrint in background
advanced.printHighQualitybooleanfalseHigh quality
advanced.printUseMostRecentSettingsbooleantrueUse the most recently used print settings
advanced.printWhatstring'slides'Print what
advanced.printColorModestring'color'Color/grayscale
advanced.printHiddenSlidesbooleanfalsePrint hidden slides
advanced.printScaleToFitbooleanfalseScale to fit paper
advanced.printFrameSlidesbooleanfalseFrame slides
advanced.pdfIncludeHiddenSlidesbooleanfalseInclude hidden slides
advanced.pdfSlidesAsPicturesbooleanfalseSave slides as pictures
quickAccess.visiblebooleantrueShow Quick Access Toolbar
quickAccess.positionstring'above'Toolbar Position
quickAccess.showCommandLabelsbooleanfalseAlways show command labels
trust.openInProtectedViewbooleanfalseOpen presentations in Protected View
trust.allowExternalContentbooleanfalseAllow external content (remote images and media)
trust.allowFontDownloadsbooleantrueDownload fonts that are not installed or embedded (Google Fonts)
trust.confirmExternalHyperlinksbooleantrueConfirm before opening external hyperlinks

File tab pages (backstage.hiddenPages) ​

IdPage
homeHome
newNew
openOpen
infoInfo
saveSave
saveAsSave As
printPrint
shareShare
exportExport
closeClose
accountAccount
optionsOptions

File tab cards (backstage.hiddenCards) ​

IdCard
protectProtect Presentation
inspectInspect Presentation
embedFontsEmbed Fonts
signaturesDigital Signatures
versionHistoryVersion History
saveAsPptxPowerPoint Presentation
saveAsPpsxPowerPoint Show
saveAsPptmMacro-Enabled Presentation
saveAsPptPowerPoint 97-2003 Presentation
pdfCreate PDF
pngExport current slide
videoCreate a Video
gifCreate an Animated GIF
jsonExport as JSON
copyImageCopy as Image
printPrint Presentation
shareShare 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.

ts
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) ​

IdEntry
copyCopy
cutCut
pastePaste
duplicateDuplicate
edit-textEdit Text
edit-pointsEdit Points
bring-forwardBring Forward
send-backwardSend Backward
bring-frontBring to Front
send-backSend to Back
ai-askAsk AI about this
ai-fixFix with AI
commentAdd Comment
hyperlinkEdit Hyperlink
table-insert-row-aboveInsert Row Above
table-insert-row-belowInsert Row Below
table-delete-rowDelete Row
table-insert-col-leftInsert Column Left
table-insert-col-rightInsert Column Right
table-delete-colDelete Column
table-merge-selectedMerge Selected Cells
table-merge-rightMerge Right
table-merge-downMerge down
table-splitSplit Cell
groupGroup
ungroupUngroup
cropCrop
merge-unionUnion Shapes
merge-combineCombine Shapes
merge-fragmentFragment Shapes
merge-intersectIntersect Shapes
merge-subtractSubtract Shapes
save-as-pictureSave as Picture...
edit-alt-textEdit Alt Text...
size-and-positionSize and Position...
format-shapeFormat Shape...
format-chart-elementFormat Chart Area...
deleteDelete

Empty-canvas context menu (contextMenu.hiddenCanvasCommands) ​

IdEntry
pastePaste
layoutLayout
reset-slideReset Slide
format-backgroundFormat Background...
grid-and-guidesGrid and Guides
rulerRuler

Edit Points menu (contextMenu.hiddenEditPointsCommands) ​

IdEntry
add-pointAdd Point
delete-pointDelete Point
delete-segmentDelete Segment
open-pathOpen Path
close-pathClose Path
smooth-pointSmooth Point
straight-pointStraight Point
corner-pointCorner Point
straight-segmentStraight Segment
curved-segmentCurved Segment
exitExit Edit Points

Editor shortcuts (keyboard.disabled, keyboard.remap) ​

IdCommand
undoUndo (Ctrl/Cmd+Z).
redoRedo (Ctrl/Cmd+Y, Ctrl/Cmd+Shift+Z).
copyCopy the selection (Ctrl/Cmd+C).
cutCut the selection (Ctrl/Cmd+X).
pastePaste (Ctrl/Cmd+V).
duplicateDuplicate the selection (Ctrl/Cmd+D).
deleteDelete the selection (Delete, Backspace).
selectAllSelect every element on the slide (Ctrl/Cmd+A).
groupGroup the selection (Ctrl/Cmd+G).
ungroupUngroup (Ctrl/Cmd+Shift+G).
nudgeMove the selection with the arrow keys (disable only; not remappable).
prevSlidePrevious slide (ArrowLeft with nothing selected).
nextSlideNext slide (ArrowRight with nothing selected).
escapeEscape: leave the current mode (disable only; not remappable).
findFind (Ctrl/Cmd+F).
findReplaceFind and replace (Ctrl/Cmd+H).
toggleShortcutsKeyboard-shortcut reference (?, Ctrl/Cmd+/).
alignLeftAlign text left (Ctrl/Cmd+L).
alignCenterCenter text (Ctrl/Cmd+E).
alignRightAlign text right (Ctrl/Cmd+R).
alignJustifyJustify text (Ctrl/Cmd+J).
increaseFontSizeIncrease font size (Ctrl/Cmd+Shift+>).
decreaseFontSizeDecrease font size (Ctrl/Cmd+Shift+<).
copyFormatCopy formatting (Ctrl/Cmd+Shift+C).
pasteFormatPaste formatting (Ctrl/Cmd+Shift+V).
newSlideNew slide (Ctrl/Cmd+M).
hyperlinkInsert or edit a hyperlink (Ctrl/Cmd+K).
clearFormattingClear character formatting (Ctrl/Cmd+Space).
cycleSelectionNextSelect the next element (Tab, inside the slide).
cycleSelectionPrevSelect the previous element (Shift+Tab, inside the slide).
editTextEdit the text of the selected object (Enter, inside the slide).
pasteSpecialPaste Special (Ctrl/Cmd+Alt+V).

Panels (hiddenPanels) ​

IdRegion
statusBarThe status bar under the canvas (slide counter, zoom, view buttons).
slidesPaneThe slide thumbnail rail on the left.
inspectorThe format / properties inspector on the right.
notesThe speaker-notes panel under the canvas.
quickAccessToolbarThe quick-access strip in the title bar (save, undo, redo, ...).
titleBarThe title bar above the ribbon (file name, quick access, account).
selectionPaneThe Selection Pane and View > Selection Pane.
findReplaceThe Find and Replace panel, Home > Find / Replace and their shortcuts.
accessibilityPaneThe accessibility checker panel, Review > Check Accessibility and Help > Accessibility checker.
comparePaneThe Compare panel and Review > Compare.

Features (disabledFeatures) ​

IdWhat it switches off
aiThe AI assistant: toolbar toggle, chat panel, AI context-menu entries, AI Options page.
collaborationReal-time collaboration: Share and Broadcast buttons, dialogs and File pages.
commentsCommenting: the Add Comment context-menu entry and the Comments groups of Insert and Review.
presentModeSlide-show entry points: the Slide Show ribbon tab.
editPointsEdit Points: the Edit Points context-menu entry and the point-editing mode it opens.

Dialogs (hiddenDialogs) ​

IdWhat it removes
optionsFile > Options (the Settings dialog) and the File tab entry that opens it.
shareThe Share dialog, its toolbar button, File > Share page and card.
broadcastThe Broadcast dialog and its button.
printThe Print dialog, File > Print page and card.
exportFile > Export page, its cards and the Export button.
hyperlinkThe Insert Hyperlink dialog: Insert > Link, the Link menu entry and its shortcut.
equationThe Equation editor and Insert > Equation.
pasteSpecialThe Paste Special dialog and its shortcut.
slideTemplatesThe slide template gallery and its entry at the end of the Home > New Slide menu.
passwordProtectionThe password protection dialog and the File > Info Protect card.
signaturesThe digital signatures dialog and the File > Info Signatures card.

Export formats (hiddenExportFormats) ​

IdFormat
pdfExport to PDF.
pngExport the current slide as PNG.
videoExport the deck as a video.
gifExport the deck as an animated GIF.
jsonExport the parsed deck as JSON.
copyImageCopy the current slide to the clipboard as an image.

Capabilities (capabilities) ​

IdWhat false removes
editEditing. false opens the deck read-only whatever the edit prop says.
exportExporting: the same as hiding the export dialog.
printPrinting: the same as hiding the print dialog.
shareSharing: hides the share and broadcast dialogs.
copyCopying content out: Copy, Cut, Save as Picture, their shortcuts and Copy as image.
presentPresenting: the same as disabling the presentMode feature.
commentCommenting: the same as disabling the comments feature.

Replaceable regions (regions) ​

IdRegion
inspectorThe right-hand inspector column (the pane, not its open/close state).
slidesPaneThe slide thumbnail rail on the left.
notesThe speaker-notes panel under the canvas.
statusBarThe status bar under the canvas.
dialog.optionsThe body of File > Options (the Settings dialog). Context adds options, setOption, resetOptions.
dialog.shareThe body of the Share dialog.
dialog.broadcastThe body of the Broadcast dialog.
dialog.printThe body of the Print dialog.
backstage.homeThe body of File > Home.
backstage.newThe body of File > New.
backstage.openThe body of File > Open.
backstage.infoThe body of File > Info.
backstage.saveThe body of File > Save.
backstage.saveAsThe body of File > Save As.
backstage.printThe body of File > Print.
backstage.shareThe body of File > Share.
backstage.exportThe body of File > Export.
backstage.closeThe body of File > Close.
backstage.accountThe body of File > Account.
backstage.optionsThe body of File > Options.

Drawing tools (hiddenDrawingTools) ​

IdTool
freeformShapeFreeform: Shape
curveCurve

Released under the Apache-2.0 License.