pptx-pptxgenjs-browser-and-node
/pptx-pptxgenjs-browser-and-node
Use this skill when generating presentations in JavaScript/TypeScript environments (Node.js, Next.js, browser) using PptxGenJS.
- Author
- nextboxis ↗
- Repository
- library-skill-agents ↗
- Licence
- MIT
- Last repository change
- 28.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 28.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use this skill when generating presentations in JavaScript/TypeScript environments (Node.js, Next.js, browser) using PptxGenJS.
Original author description
Use this skill when generating presentations in JavaScript/TypeScript environments (Node.js, Next.js, browser) using PptxGenJS.
How it works
- When to use
- Design principles
- Step-by-step workflow
- Specifics & examples
- Common mistakes
- Review checklist
- Related skills
SKILL.md preview
---
name: pptx-pptxgenjs-browser-and-node
description: Use this skill when generating presentations in JavaScript/TypeScript environments (Node.js, Next.js, browser) using PptxGenJS.
---
# PptxGenJS in Node.js and Browser
## When to use
Use this skill when authoring presentation generators in full-stack JavaScript, serverless TypeScript microservices, or client-side web applications.
## Design principles
- **Standard 16:9 Layout Preset**: PptxGenJS defaults to `LAYOUT_16x9` (10 x 5.625 in) or custom coordinates; set `layout = 'LAYOUT_16x9'` explicitly.
- **Hex Color Strings Without Hash**: PptxGenJS takes hex color strings *without* the leading `#` (e.g., `'0F172A'`, `'2563EB'`).
- **Object-Based Slide Definitions**: Define slide content cleanly using declarative JavaScript object descriptors.
- **Promise-Based File Generation**: Handle export asynchronously using `writeFile()` or `write('blob')` in web browsers.
## Step-by-step workflow
1. **Import and instantiate library**:
- `import pptxgen from "pptxgenjs"; const pres = new pptxgen();`.
2. **Define slide dimensions**:
- `pres.layout = 'LAYOUT_16x9';` (or define custom 13.333 x 7.500 in layout).
3. **Add slides**:
- `const slide = pres.addSlide();`.
4. **Insert elements**:
- Add Title: `slide.addText("Enterprise System Roadmap", { x: 0.8, y: 0.6, w: 11.7, fontSize: 32, bold: true, color: '0F172A' });`.
- Add Card Shape: `slide.addShape(pres.ShapeType.roundRect, { x: 0.8, y: 1.8, w: 3.6, h: 4.6, fill: { color: 'F8FAFC' }, line: { color: 'E2E8F0', width: 1 } });`.
5. **Export deck**:
- `await pres.writeFile({ fileName: "presentation.pptx" });`.
## Specifics & examples
- **Runnable Node.js / TypeScript Example**:
```typescript
import pptxgen from "pptxgenjs";
async function generateDeck() {
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
// Add title slide
const slide = pres.addSlide();
// Action Title
slide.addText("Autonomous Incident Remediation", {
x: 0.8,
y: 0.6,
w: 11.7,
h: 0.8,
fontSize: 32,
fontFace: "Arial",
bold: true,
color: "0F172A"
});
// Feature Card
slide.addShape(pres.ShapeType.roundRect, {
x: 0.8,
y: 1.8,
w: 5.6,
h: 4.8,
fill: { color: "FFFFFF" },
line: { color: "2563EB", width: 2 },
rectRadius: 0.1
});
slide.addText("Key Benchmark Finding", {
x: 1.1,
y: 2.1,
w: 5.0,
fontSize: 20,
bold: true,
color: "0F172A"
});
await pres.writeFile({ fileName: "output_node.pptx" });
}
```
## Common mistakes
- Including `#` in color hex strings (e.g. `'#2563EB'`), which can break rendering in PptxGenJS.
- Forgetting that PptxGenJS units are in inches by default, leading to massive coordinate errors.
- Failing to await the `writeFile()` promise in asynchronous Node pipelines.
## Review checklist
- [ ] Presentation layout is explicitly configured for 16:9 widescreen.
- [ ] Color values are 6-character hex strings without leading `#`.
- [ ] Coordinates and dimensions use inches consistently.
- [ ] Async export (`writeFile` / `write`) is properly awaited.
## Related skills
- pptx-python-pptx-foundations
- pptx-code-layout-helpers-and-design-tokens
- pptx-slide-masters-and-layouts
- pptx-design-consistency
Versions
The database has no other skills named pptx-pptxgenjs-browser-and-node.
Database snapshot: 13.11.2026 · package version 7a62ea39e800 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100pptx-official
Generating PowerPoint presentations with pptxgenjs in Node.js. Use when creating automated presentations, slide decks, pitch decks, or reports in .pptx format from data. - 100powerpoint
Create designed, editable PowerPoint .pptx presentations with PptxGenJS. Use when the user asks to create, generate, update, or inspect a deck, slide deck, presentation, or .pptx file. - 100od-pptx-generator
Create and edit PowerPoint presentations from scratch with PptxGenJS — MiniMax's production-tested deck pipeline. Use when the user asks for pptx generator work, or mentions od, pptx, generator. - 100slide-making-skill
Implement single-slide PowerPoint pages with PptxGenJS. Use when writing or fixing slide JS files: dimensions, positioning, text/image/chart APIs, styling rules, and export expectations for native .pptx output. - 95pptx-generator
生成、编辑、读取 PowerPoint 演示文稿。支持用 PptxGenJS 从零创建(封面、目录、内容页、章节分隔页、总结页),通过 XML 工作流编辑已有 PPTX,或使用 markitdown 提取文本。触发器:PPT, PPTX, PowerPoint, 演示文稿, 幻灯片, 幻灯片组。 - 100ppt-creation
当任务要求创建、读取、解析、提取、编辑、修改、合并、拆分、转换或检查 PPT / 幻灯片 / 演示文稿 / deck / slides / presentation / .pptx 文件时使用。本 skill 以内置模板为版面底座,让 Agent 在内容区自由设计;支持原生 PptxGenJS 绘制、可选组件、用户素材、论文原图和合规网络素材。