Skip to content

Installation

The pptx-viewer packages are published independently on npm. Install only what you need: the framework-agnostic core engine, one of the framework viewer packages, or the low-level binary converters.

Node version

Node.js 18 or newer is required for TypeScript compilation and for running the packages outside the browser.

Choose your framework

FrameworkPackageNotes
Reactpptx-react-viewerFull-featured: viewer, editor, presenter, export, collaboration
Vue 3pptx-vue-viewerViewer-first; editor features being ported
Angularpptx-angular-viewerViewer-first; editor features being ported
Headless (Node / browser)pptx-viewer-coreNo UI, no framework dependency
AI / MCP toolingpptx-viewer-mcp24 MCP tools + CLI + Y.Doc codec

Installing from npm

React viewer

The full-featured React viewer/editor component, published as pptx-react-viewer. The core engine is bundled in, so you don't install it separately.

bash
npm install pptx-react-viewer react react-dom
bash
pnpm add pptx-react-viewer react react-dom
bash
yarn add pptx-react-viewer react react-dom
bash
bun add pptx-react-viewer react react-dom

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

Vue 3 viewer

The Vue 3 viewer component, published as pptx-vue-viewer. The core engine is bundled in.

bash
npm install pptx-vue-viewer vue
bash
pnpm add pptx-vue-viewer vue
bash
yarn add pptx-vue-viewer vue
bash
bun add pptx-vue-viewer vue
vue
<script setup lang="ts">
import { ref } from 'vue';
import { PowerPointViewer } from 'pptx-vue-viewer';

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.

bash
npm install pptx-angular-viewer @angular/core @angular/common
bash
pnpm add pptx-angular-viewer @angular/core @angular/common
bash
yarn add pptx-angular-viewer @angular/core @angular/common
bash
bun add pptx-angular-viewer @angular/core @angular/common
typescript
// app.module.ts
import { PptxAngularViewerModule } from 'pptx-angular-viewer';

@NgModule({
	imports: [PptxAngularViewerModule],
})
export class AppModule {}
html
<!-- app.component.html -->
<pptx-viewer [content]="content"></pptx-viewer>

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.

bash
npm install pptx-viewer-core
bash
pnpm add pptx-viewer-core
bash
yarn add pptx-viewer-core
bash
bun add pptx-viewer-core

MCP server and tools

24 PPTX manipulation tool functions, an MCP server for AI agents, and the Y.Doc collaboration codec - all built on the core engine.

bash
npm install pptx-viewer-mcp
bash
pnpm add pptx-viewer-mcp
bash
yarn add pptx-viewer-mcp
bash
bun add pptx-viewer-mcp

Low-level converters

The emf-converter and mtx-decompressor packages are pulled in transitively by the core engine, but can also be installed standalone.

bash
npm install emf-converter mtx-decompressor
bash
pnpm add emf-converter mtx-decompressor
bash
yarn add emf-converter mtx-decompressor
bash
bun add emf-converter mtx-decompressor

Optional peer dependencies

Some features in the React package activate only when their optional peers are present.

FeatureOptional peersNotes
3D models (GLB/GLTF)threeWithout them, 3D elements fall back to their poster image.
Real-time collaborationyjs, y-websocketYjs CRDT with presence tracking.
bash
npm install three yjs y-websocket
bash
pnpm add three yjs y-websocket
bash
yarn add three yjs y-websocket
bash
bun add three yjs y-websocket

Local development (cloning the monorepo)

The monorepo uses Bun as its package manager and workspace runner. Packages reference each other through the workspace:* protocol.

bash
# Clone the repository
git clone https://github.com/ChristopherVR/pptx-viewer
cd pptx-viewer

# Install all workspace dependencies
bun install

# Build all packages
bun run build

# Run tests / type-check
bun run test
bun run typecheck

Build order matters

Packages must be built in dependency order:

core -> shared -> react / vue / angular

bun run build from the repo root 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

bash
bun run build        # Build all packages in dependency order
bun run test         # Run vitest across all packages
bun run typecheck    # Type-check all packages
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)

Next steps

Released under the Apache-2.0 License.