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

@shbernal/pptxgenjs

v6.0.0

Published

Create JavaScript PowerPoint Presentations

Readme

PptxGenJS

PptxGenJS generates PowerPoint .pptx files from TypeScript and modern JavaScript. This maintained project targets ESM package consumers, typed application code, reproducible package verification, and agent-assisted OOXML development.

Project Target

  • Generate standards-based PowerPoint .pptx packages without requiring PowerPoint at runtime.
  • Support TypeScript-first workflows with checked declarations and modern bundler resolution.
  • Ship a small, explicit ESM package boundary for Node.js, Vite, React, Angular, Electron, and similar modern toolchains.
  • Keep OOXML changes grounded in fixtures, schema validation, and PowerPoint compatibility evidence.
  • Make the repository practical for human and agent-driven maintenance.

Install

pnpm add @shbernal/pptxgenjs
npm install @shbernal/pptxgenjs
yarn add @shbernal/pptxgenjs

Quick Start

import pptxgen from "@shbernal/pptxgenjs"

const pptx = new pptxgen()
const slide = pptx.addSlide()

slide.addText("Hello from PptxGenJS", {
  x: 1,
  y: 1,
  w: 8,
  h: 1,
  fontSize: 24,
  color: "363636",
})

await pptx.writeFile({ fileName: "example.pptx" })

What It Can Generate

  • Slides, layouts, masters, sections, notes, and metadata.
  • Text, tables, shapes, images, SVGs, charts, and media.
  • Browser-downloadable, streamed, buffered, Blob, base64, or file outputs, depending on the runtime.
  • OOXML that is intended to open cleanly in Microsoft PowerPoint and other .pptx consumers such as Keynote, LibreOffice Impress, and Google Slides import.

Runtime And Package Support

The package is ESM-only.

Supported package surface:

  • import pptxgen from "@shbernal/pptxgenjs"
  • import { ShapeType } from "@shbernal/pptxgenjs/core"
  • import pptxgen from "@shbernal/pptxgenjs/node"
  • import pptxgen from "@shbernal/pptxgenjs/browser"
  • import pptxgen from "@shbernal/pptxgenjs/standalone"
  • generated runtime and declaration artifacts under dist/
  • Node.js >=24
  • modern bundlers and module-aware app frameworks

Dropped compared to upstream:

  • No CommonJS support: no require("@shbernal/pptxgenjs"), no CJS export condition, and no dist/pptxgen.cjs.js. Modern Node.js may provide require() interop for ESM, but it is not a maintained API.
  • No IIFE/global browser bundle: no window.PptxGenJS classic script API, no dist/pptxgen.bundle.js, and no dist/pptxgen.min.js.

The old named ESM artifact dist/pptxgen.es.js is also no longer shipped. Use the package exports instead of direct artifact paths.

See runtime and package support for the complete support contract.

Documentation

Repository Development

This repository uses pnpm and requires Node.js >=24.

pnpm install
pnpm run build
pnpm run typecheck
pnpm run test:unit

OOXML serialization changes should also add or update a schema fixture and run:

./tools/ooxml-validator/install.sh
pnpm run test:schema

Package-boundary changes should run:

pnpm run build
pnpm run package:lint
pnpm run pack:check
pnpm run test:package

Demos

  • demos/node exercises Node.js ESM generation and stream output.
  • demos/vite-demo exercises a modern React, TypeScript, and Vite app.

Relationship To Upstream

This project builds on PptxGenJS by Brent Ely and contributors. The modernized package target is intentionally narrower than upstream in order to simplify the runtime contract and keep maintenance focused.

License

Copyright (c) 2015-present Brent Ely and PptxGenJS contributors. Fork modifications copyright (c) 2026 shbernal.

MIT