pom
npm install @hirokisakabe/pom

Declarative PowerPoint
from XML

Write XML. Get editable PPTX. pom turns declarative markup into native PowerPoint slides with Flexbox layout, 18 built-in node types, and first-class AI support.

Features

🤖

AI Friendly

Simple XML structure designed for LLM code generation. Include llm.txt in your system prompt for XML reference.

📝

Declarative

Describe slides as XML. No imperative API calls needed — just data in, PPTX out.

📐

Flexible Layout

Flexbox-style layout with VStack / HStack, powered by yoga-layout.

🧩

Rich Nodes

18 built-in node types: charts, flowcharts, tables, timelines, org trees, and more.

📊

PowerPoint Native

Generates real editable PowerPoint shapes — not images. Recipients can modify everything.

🎨

Master Slide

Define headers, footers, and page numbers once — applied to all slides automatically.

XML in, PPTX out

Describe your slides in XML and generate native PowerPoint files with a single function call.

generate.ts
import { buildPptx } from "@hirokisakabe/pom";

const xml = `
<VStack w="100%" h="max" padding="48" gap="24" alignItems="start">
  <Text fontSize="48" bold="true">
    Presentation Title
  </Text>
  <Text fontSize="24" color="666666">
    Generated with pom
  </Text>
</VStack>
`;

const { pptx } = await buildPptx(xml, { w: 1280, h: 720 });
await pptx.writeFile({ fileName: "presentation.pptx" });

18 Built-in Node Types

From simple text to complex charts and diagrams — everything renders as native PowerPoint shapes.

Quick Start

1. Install

npm install @hirokisakabe/pom

2. Generate

const { pptx } = await buildPptx(xml, { w: 1280, h: 720 });
await pptx.writeFile({ fileName: "presentation.pptx" });

3. For AI agents

Include llm.txt in your system prompt for a compact XML reference designed for LLMs.