Installation
The pptx-viewer packages are published independently on npm. Install only what you need: the framework-agnostic core engine or one of the framework viewer packages.
Node version
Node.js 22 or newer is required for TypeScript compilation and for running the packages outside the browser.
Choose your framework
| Framework | Package | Notes |
|---|---|---|
| React | pptx-react-viewer | Viewer, editor, presenter, export, collaboration |
| Vue 3 | pptx-vue-viewer | Same engine and feature set as the React binding |
| Angular | pptx-angular-viewer | Same engine and feature set as the React binding |
| Svelte 5 | pptx-svelte-viewer | Same engine and feature set as the React binding |
| No framework | pptx-vanilla-viewer | Same engine, plain DOM: no framework dependency at all |
| Headless (Node / browser) | pptx-viewer-core | No UI, no framework dependency |
| AI / MCP tooling | pptx-viewer-mcp | 74 MCP tools + CLI + Y.Doc codec |
Installing from npm
React viewer
The React viewer/editor component, published as pptx-react-viewer. The core engine is bundled in, so you don't install it separately.
npm install pptx-react-viewer react react-dompnpm add pptx-react-viewer react react-domyarn add pptx-react-viewer react react-dombun add pptx-react-viewer react react-domOther peer dependencies
The viewer also expects framer-motion, lucide-react, react-icons, jspdf, jszip, fast-xml-parser, and i18next/react-i18next - install the ones your usage needs. If you translate through PptxI18nProvider, import from pptx-react-viewer/no-i18next: it never uses or bundles i18next and react-i18next, although most package managers still install them because they are declared peers; see Without react-i18next.
Vue 3 viewer
The Vue 3 viewer component, published as pptx-vue-viewer. The core engine is bundled in.
npm install pptx-vue-viewer vue vue-i18npnpm add pptx-vue-viewer vue vue-i18nyarn add pptx-vue-viewer vue vue-i18nbun add pptx-vue-viewer vue vue-i18n<script setup lang="ts">
import { PowerPointViewer } from 'pptx-vue-viewer';
import { ref } from 'vue';
const content = ref<ArrayBuffer | null>(null);
</script>
<template>
<PowerPointViewer :content="content" />
</template>Angular viewer
The Angular viewer component, published as pptx-angular-viewer. The core engine is bundled in.
npm install pptx-angular-viewer @angular/core @angular/common @angular/platform-browser @ngx-translate/core rxjspnpm add pptx-angular-viewer @angular/core @angular/common @angular/platform-browser @ngx-translate/core rxjsyarn add pptx-angular-viewer @angular/core @angular/common @angular/platform-browser @ngx-translate/core rxjsbun add pptx-angular-viewer @angular/core @angular/common @angular/platform-browser @ngx-translate/core rxjs// app.component.ts (standalone component, no NgModule)
import { Component } from '@angular/core';
import { PowerPointViewerComponent } from 'pptx-angular-viewer';
@Component({
selector: 'app-root',
standalone: true,
imports: [PowerPointViewerComponent],
templateUrl: './app.component.html',
})
export class AppComponent {}<!-- app.component.html -->
<pptx-viewer [content]="content"></pptx-viewer>Svelte 5 viewer
The Svelte 5 viewer component, published as pptx-svelte-viewer. The core engine is bundled in - see the Svelte docs for the full component reference.
npm install pptx-svelte-viewer sveltepnpm add pptx-svelte-viewer svelteyarn add pptx-svelte-viewer sveltebun add pptx-svelte-viewer svelte<script lang="ts">
import { PowerPointViewer } from 'pptx-svelte-viewer';
let bytes = $state<Uint8Array | null>(null);
</script>
{#if bytes}
<PowerPointViewer source={bytes} />
{/if}Vanilla JS viewer (no framework)
The zero-framework viewer, published as pptx-vanilla-viewer. The core engine is bundled in; there are no framework peer dependencies. Viewing, presenting, and editing (behind the editable option) all work from a single factory function - see the Vanilla JS docs for the full API reference.
npm install pptx-vanilla-viewerpnpm add pptx-vanilla-vieweryarn add pptx-vanilla-viewerbun add pptx-vanilla-viewerimport { createPptxViewer } from 'pptx-vanilla-viewer';
const viewer = createPptxViewer(document.getElementById('host')!, {
source: '/decks/quarterly.pptx',
editable: true,
});Core engine
The framework-agnostic engine for parsing, editing, serializing, and converting PPTX files. Use this when you need headless automation, build scripts, or Node.js pipelines with no UI dependency. The UI packages above bundle the core engine, so you don't need to install it separately if you're already using one of them.
npm install pptx-viewer-corepnpm add pptx-viewer-coreyarn add pptx-viewer-corebun add pptx-viewer-coreMCP server and tools
74 PPTX manipulation tool functions, an MCP server for AI agents, and the Y.Doc collaboration codec - all built on the core engine.
npm install pptx-viewer-mcppnpm add pptx-viewer-mcpyarn add pptx-viewer-mcpbun add pptx-viewer-mcpOptional peer dependencies
Some features in the React package activate only when their optional peers are present.
| Feature | Optional peers | Notes |
|---|---|---|
| 3D models (GLB/GLTF) | three | Without them, 3D elements fall back to their poster image. |
| Real-time collaboration | yjs, y-websocket | Yjs CRDT with presence tracking. |
npm install three yjs y-websocketpnpm add three yjs y-websocketyarn add three yjs y-websocketbun add three yjs y-websocketLocal development (cloning the monorepo)
The PowerPoint viewer lives in the ooxml monorepo under viewers/pptx. The monorepo uses Bun as its package manager and workspace runner.
# Clone the repository and install every workspace dependency from the root
git clone https://github.com/ChristopherVR/ooxml.git
cd ooxml
bun install
# Build ooxml-core and ooxml-ui first, then work from the viewer
bun run build
bun run --cwd src/ui build
cd viewers/pptx
# Build the viewer packages, then test / type-check
bun run build
bun run test
bun run typecheckBuild order matters
The viewer packages consume the built ooxml-core and ooxml-ui, so build those at the repository root first (as above). Inside viewers/pptx the packages build in dependency order:
core -> shared -> locales -> tools -> react / vue / angular / vanilla / svelte -> clibun run build in viewers/pptx handles this for you. When building a single package manually (cd packages/<pkg> && bun run build), make sure its dependencies are built first.
Common workspace commands
bun run build # Build all packages in dependency order
bun run test # Run vitest across all packages
bun run typecheck # Type-check all packages (needs built packages)
bun run typecheck:fresh # Build the packages, then type-check (clean checkouts)
bun run fmt # Format with oxfmt
bun run lint # Lint with oxlint
bun run demo # Start the React demo dev server (port 4173)
bun run demo:vue # Start the Vue demo dev server (port 4175)
bun run demo:angular # Start the Angular demo dev server (port 4174)
bun run demo:vanilla # Start the Vanilla JS demo dev server (port 4176)
bun run demo:svelte # Start the Svelte demo dev server (port 4177)Next steps
- Quick Start - create, parse, convert, and render presentations.
- Architecture - how the layers fit together.
- Limitations - important caveats before going to production.