@christophervr/pptx-viewer
v3.1.0
Published
Interactive installer for the pptx-viewer family of packages (React, Vue, Angular, Svelte, vanilla JS, the core engine, the MCP server). Also a drop-in for pptx-react-viewer: importing this package re-exports the React component.
Maintainers
Readme
@christophervr/pptx-viewer
An npx installer that adds the PowerPoint viewer to your React, Vue, Angular, Svelte or plain JavaScript project (or scaffolds a new one), and, imported as a library, the React viewer from pptx-react-viewer under a scoped name.
Live demo · Documentation · Installation guide · Changelog · Report a bug

Install
Nothing needs installing first for the installer:
npx @christophervr/pptx-viewer@latest
# or
bunx @christophervr/pptx-viewer@latestTo use it as a library, install it with pptx-react-viewer and the React viewer's peers (they are optional peers here, so an installer-only use never warns about React):
npm install @christophervr/pptx-viewer pptx-react-viewer
npm install react react-dom framer-motion lucide-react react-icons jspdf jszip fast-xml-parser i18next react-i18nextQuick start
The installer asks what you are building, checks your project, then installs the right package or scaffolds a starter app:
| Target | Installs |
| ---------- | ---------------------------------------------------------------------------------------------------------------------- |
| React | pptx-react-viewer, for React 18.2 or 19 |
| Vue | pptx-vue-viewer, for Vue 3.5 |
| Angular | pptx-angular-viewer, for Angular 19 to 22 |
| Svelte | pptx-svelte-viewer, for Svelte 5 |
| Vanilla JS | pptx-vanilla-viewer, no framework |
| Core | pptx-viewer-core, the engine with no UI |
| MCP | Nothing: it prints the MCP client configuration for pptx-viewer-mcp |
- Pick targets. Arrow keys move, Space toggles,
aselects all, Enter confirms: at most one UI framework, pluscoreandmcpif you like. - Compatibility check. With a
package.jsonpresent, it compares your installedreact,vue,@angular/coreorsveltemajor with what the viewer supports, and asks before going on when they differ. - Install here, or scaffold. Installing here needs an existing
package.json. Scaffolding creates a project withcreate-vite(React, Vue, Svelte, Vanilla JS) or@angular/cli(whose current major needs Node.js 22.22.0+, 24.13.1+ or 26.0.0+), replaces its entry file with a working viewer, installs the viewer and its companion packages, offers collaboration (yjs,y-websocket,y-webrtc) and, for Vanilla JS, 3D (three), then starts the dev server.
It detects bun, pnpm, yarn or npm from your lockfile, then from the manager that launched it, and prints a quick-start snippet when it is done.
Options
npx @christophervr/pptx-viewer --target react,mcp --yes
npx @christophervr/pptx-viewer --target vue --scaffold --dir my-app --yes
npx @christophervr/pptx-viewer --pm pnpm| Flag | Meaning |
| ---------------- | ------------------------------------------------------------------------------------------------ |
| --target <ids> | Comma-separated react, vue, angular, svelte, vanilla, core, mcp; skips the picker. |
| --scaffold | Create a new project instead of installing here; needs exactly one UI target. |
| --dir <name> | The new project's folder (default pptx-<target>-app). |
| --pm <manager> | bun, pnpm, yarn or npm, instead of detecting one. |
| --yes, -y | Skip confirmations, including the compatibility warning; optional prompts take their default. |
| --help, -h | Print usage and exit. |
Without --target and without a terminal (piped stdin, most CI runners) it exits with an error instead of waiting for input. An unknown flag, target or manager exits with a one-line error, and Ctrl+C in the picker exits with status 130. Colour turns off under NO_COLOR or when output is not a terminal.
As a React component
import { PowerPointViewer } from '@christophervr/pptx-viewer';
import 'pptx-react-viewer/styles';
// <div style={{ height: '100vh' }}><PowerPointViewer content={bytes} canEdit /></div>Everything pptx-react-viewer exports from its root is re-exported here, so its README (props, events, theming, localisation) and React guide apply as written. The stylesheet and the subpath entries (/styles, /ai, /i18n, /viewer) ship only under the real package name, which is why the install line adds it. For a new React project, depending on pptx-react-viewer alone is simpler.
Status and limits
PowerPoint carries no stability label yet: it has not been assessed against the stability policy. The library inherits the React viewer's limits (see its README, the limitations page and the Office parity checklist). The installer installs only into a project with a package.json, and scaffolds only one UI target at a time.
Privacy and network use
The installer runs your package manager and, when scaffolding, create-vite or @angular/cli, which download packages from your configured registry. It sends nothing else.
As a library this package is the React viewer, which renders and saves decks in the browser and never uploads them. It contacts other servers only for web fonts that are neither installed nor embedded (Google Fonts, on by default; googleFonts: false or a mirror turns it off), for a deck's linked pictures and media after the reader chooses Enable Content (or allowExternalContent: true), for links the reader clicks, for Share and Broadcast once started, and for the AI assistant when you pass ai. The React viewer's README gives the details. Nothing collects analytics or telemetry. See PRIVACY.md.
Browser support
- The library: the last two major versions of Chrome, Edge, Firefox and Safari, Safari 16.4 at least (browser support), with React 18.2 or 19.
- Node.js 22.3 or newer to run the installer and to build.
Documentation and demos
- Documentation, the installation guide and the live demo.
- The packages it installs are listed above; the PowerPoint overview shows how they fit together.
- Part of ooxml.
License
Apache-2.0. Keep the NOTICE file with redistributions.
