npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pptx-svelte-viewer

v0.6.0

Published

Svelte 5 PowerPoint viewer component: render PPTX slides in the browser.

Readme

pptx-svelte-viewer

npm version license

Show, edit, and present Microsoft PowerPoint (.pptx) files directly in a Svelte 5 app: no server, no conversion step, no PowerPoint install required. Drop in a <PowerPointViewer> component (built with runes), hand it the file's bytes, and it renders slides as real HTML and CSS.

PowerPoint editor UI rendered in the browser

The rendering is done by the framework-agnostic pptx-viewer-core engine, which turns a .pptx file into a structured slide model. This package is the Svelte layer that draws that model on screen, and the engine is bundled in, so you install just one package.

▶️ Try the live demo · 📦 npm · 📖 Full docs · 🧩 Core SDK

Features

  • A single component: <PowerPointViewer>, written with Svelte 5 runes.
  • Real HTML rendering: slides are drawn as ordinary HTML and SVG, not as a picture, so text stays sharp at any zoom and is selectable and accessible.
  • Full element coverage: text, shapes, images, groups, connectors, tables, charts, SmartArt (2D and opt-in 3D), media (video/audio), ink, OLE embedded objects, and 3D models - all powered by the same shared engine as the other bindings.
  • Editing: insert and format elements; multi-select, group, arrange, drag, resize, and rotate; rich inline text and notes editing; inherited template element editing; undo/redo; save the edited deck back to .pptx.
  • Presentation mode: fullscreen presenting via the real Fullscreen API, with media autoplay.
  • Export: PNG, PDF, GIF, video, print, notes pages, and handouts.
  • Slide navigation: responsive desktop/mobile chrome, thumbnail sidebar, toolbar, keyboard navigation, and a rich speaker-notes panel.
  • Review and accessibility: comments and presentation-wide accessibility checks from the Review ribbon.
  • Themeable: the shared ViewerTheme system (--pptx-* CSS custom properties), including the vermilion presets.
  • i18n: English built in; register more locales via pptx-svelte-viewer/i18n.

Install

npm install pptx-svelte-viewer jszip fast-xml-parser

Requires Svelte 5 (runes) as a peer. The pptx-viewer-core engine is bundled in, so you don't install it separately unless you want to call the SDK directly.

Usage

<script lang="ts">
	import { PowerPointViewer } from 'pptx-svelte-viewer';

	let source: ArrayBuffer | undefined = $state();

	async function open(file: File) {
		source = await file.arrayBuffer();
	}
</script>

<div style="height: 600px">
	<PowerPointViewer
		{source}
		initialSlide={0}
		showThumbnails
		showToolbar
		onload={(detail) => console.log('slides:', detail.slideCount)}
		onslidechange={(index) => console.log('slide', index)}
		onerror={(message) => console.error(message)}
	/>
</div>

Props

| Prop | Type | Default | Description | | ---------------- | ------------------------------- | ------- | ------------------------------------------------- | | source | Uint8Array \| ArrayBuffer | - | Raw .pptx bytes. | | theme | ViewerTheme | - | Color/radius/CSS-var overrides. | | locale | string | 'en' | UI locale (see pptx-svelte-viewer/i18n). | | initialSlide | number | 0 | Slide shown after load (0-based). | | showThumbnails | boolean | true | Thumbnail sidebar. | | showToolbar | boolean | true | Navigation/zoom/fullscreen toolbar. | | showNotes | boolean | true | Speaker-notes panel and its toolbar toggle. | | editable | boolean | false | Ribbon editing, insertion, arrange, and save. | | smartArt3D | boolean | false | Opt-in Three.js 3D SmartArt renderer. | | onload | (d: ViewerLoadDetail) => void | - | Fired after a presentation loads. | | onerror | (message: string) => void | - | Fired when loading fails. | | onslidechange | (index: number) => void | - | Fired when the active slide changes. | | onnotesupdate | (notes: string) => void | - | Fired when the user edits the speaker notes. | | onchange | () => void | - | Fired after every committed edit when editable. |

See the full docs for the complete props/events contract, theming, and localization guides.

License

Apache-2.0. See LICENSE and NOTICE.