deckjsx is a TypeScript library (v0.7.0, active development) for generating PowerPoint (.pptx) presentations from TSX/JSX through a compiler pipeline. Unlike thin wrappers around PptxGenJS, deckjsx is designed as a compiler with explicit phases: author tree, semantic author graph, output projection, and output writer. It features a class-based API with typed JSX elements, CSS-like styling, grid layout support, and a modular architecture. The library ships TypeScript types and currently targets PPTX output via a temporary pptxgenjs writer adapter. Release cadence is irregular as it is early-stage.
npm install deckjsxNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a new deck, adds a slide with typed JSX content, and renders to a .pptx file.
Pin to a specific version and refer to changelog before upgrading.
Plan to migrate to future native writer when available. Check documentation.
Ensure your build tool (e.g., TypeScript, Babel, or SWC) is set to use `jsxImportSource: 'deckjsx'` (or `'deckjsx/jsx-runtime'` in some versions).
Use slide-level coordinates for direct children of slide. For nested Views, compute positions relative to parent's top-left.
Check documentation for the specific version and configure jsxImportSource accordingly. In v0.7.0, use 'deckjsx'.
Set jsxImportSource in tsconfig.json to 'deckjsx' (not 'deckjsx/jsx-runtime'). For CRA/Next.js, adjust Babel config.
Ensure you're using deckjsx >=0.5.0 and import `{ Deck }` as a named export.Add `import { Deck } from 'deckjsx'`. If types are missing, check node_modules/@types or install missing type declarations.Upgrade to >=0.7.0 where `render` is the correct method. For older versions, use `deck.render({ output })` or `deck.writePPTX({ output })`.