Overview
Customize your PPTX editor with CSS themes, React and Vue parts, the toolbar, menus, and dialogs.
Customize your PPTX editor to fit your application. Each guide lists the supported options and shows React and Vue reference code. Start with props and CSS, then compose parts when you need a different layout.
Live examples
The demo app in examples/vite/ composes these parts into a complete editor. In a checkout of the repository, run bun install and bun run dev, then open http://localhost:5274/.
Design principles
The PPTX editor separates presentation editing from interface controls. Every part reads the same editor state and runs the same commands as the packaged editor.
Start with the smallest change that fits your application:
- Appearance: Set
--doc-*CSS properties on.acme-theme .pptx-editor, where.acme-themeis a wrapper aroundPptxEditor.Root. UseclassNameanddata-activeordata-disabledto style controls. SetcolorModefor dark controls. - Composition: Use
PptxEditor.Root,.Viewport,.Content, and the panes to arrange the interface. Keep every part insideRoot. - Individual controls: Use named parts such as
PptxEditor.Toolbar.Bold. Replace an icon withicon, or supply your own element withasChild. - Control sets: Override a slot in place, use
hiddento remove it, or setpreset={false}to compose the toolbar, a menu, or a dialog yourself. - Custom behavior: Use
useEditorCommand(slotId)for command state and execution. UseuseEditorState(selector)for the state your control shows.
Keep the slide selection when you build custom controls: a chrome mousedown calls preventDefault(), except on inputs, selects, and text areas. Keep labels, keyboard support, and disabled reasons accessible. A disabled control stays focusable with aria-disabled and tells the user why it is disabled.
Hiding a control changes the interface only. The operation keeps working from menus, keyboard shortcuts, and the API.
Customization guides
Appearance
Set interface colors, spacing, and dark mode.
Layout
Place the toolbar, the menu bar, the slide rail, the notes, and panels.
Toolbar
Choose controls, replace icons, and add your own buttons.
Ribbon
Use tabs and contextual tabs, and change each tab with toolbar parts.
Menus
Choose menu bar and context menu rows.
Dialogs
Replace dialog parts, and keep draft state, validation, and focus.
Fonts
Load font bytes, choose font sources, and replace fonts in place.
Language
Translate the interface with a locale catalog, and translate your own controls.
Choose the API level
| Level | Use |
|---|---|
| Props and CSS tokens | Change labels, colors, and color mode. |
| Named parts | Arrange controls and replace selected elements. |
| Hooks and composables | Connect application controls to editor state and commands. |
| Modules | Add review, collaboration, or drawing effects (glow, inner shadow, reflection, soft edge) with @pptx-editor.dev/pro (EigenPal Pro License). Pass them in the modules prop of PptxEditor or its root; the editor reads it once, when it is created. See Capability modules for an example. |
React and Vue reference
Compose the same workspace in either adapter:
import { PptxEditor } from '@pptx-editor.dev/react';
import '@pptx-editor.dev/core/styles/editor.css';
export function DeckEditor({ bytes }: { bytes: Uint8Array }) {
return (
<div className="acme-theme">
<PptxEditor.Root document={bytes} colorMode="system">
<PptxEditor.Viewport className="deck-workspace">
<PptxEditor.Menu />
<div className="deck-workspace__dock">
<PptxEditor.Toolbar />
</div>
<div className="deck-workspace__body">
<PptxEditor.SlideRail />
<div className="deck-workspace__main">
<PptxEditor.Content />
<PptxEditor.FindBar />
<PptxEditor.EditNotice />
<PptxEditor.FontNotice />
<PptxEditor.NotesPane />
<PptxEditor.ZoomPill />
</div>
</div>
<PptxEditor.Slideshow />
</PptxEditor.Viewport>
</PptxEditor.Root>
</div>
);
}<script setup lang="ts">
import {
PptxEditorContent,
PptxEditorEditNotice,
PptxEditorFindBar,
PptxEditorFontNotice,
PptxEditorMenu,
PptxEditorNotesPane,
PptxEditorRoot,
PptxEditorSlideRail,
PptxEditorSlideshow,
PptxEditorToolbar,
PptxEditorViewport,
PptxEditorZoomPill,
} from '@pptx-editor.dev/vue';
import '@pptx-editor.dev/core/styles/editor.css';
defineProps<{ bytes: Uint8Array }>();
</script>
<template>
<div class="acme-theme">
<PptxEditorRoot :document="bytes" color-mode="system">
<PptxEditorViewport class="deck-workspace">
<PptxEditorMenu />
<div class="deck-workspace__dock">
<PptxEditorToolbar />
</div>
<div class="deck-workspace__body">
<PptxEditorSlideRail />
<div class="deck-workspace__main">
<PptxEditorContent />
<PptxEditorFindBar />
<PptxEditorEditNotice />
<PptxEditorFontNotice />
<PptxEditorNotesPane />
<PptxEditorZoomPill />
</div>
</div>
<PptxEditorSlideshow />
</PptxEditorViewport>
</PptxEditorRoot>
</div>
</template>The deck-workspace classes are your own layout CSS. Workspace layout lists it.
The adapters expose the same editing commands and components. Vue uses named exports such as PptxEditorToolbar for React's PptxEditor.Toolbar.
More control
See the API reports for @pptx-editor.dev/react and @pptx-editor.dev/vue for every part and type.