PPTX
SmartArt
Create predefined SmartArt diagrams for processes, hierarchies, and more
Use SmartArtFrame to add SmartArt graphics — predefined diagram layouts for visualizing processes, hierarchies, relationships, and more.
Basic SmartArt
import { Slide, SmartArtFrame } from "@office-open/pptx";
new Slide({
children: [
new SmartArtFrame({
x: 1,
y: 1,
width: 8,
height: 4,
layout: "process",
data: [
{ text: "Step 1", bullets: ["Detail A"] },
{ text: "Step 2", bullets: ["Detail B"] },
{ text: "Step 3", bullets: ["Detail C"] },
],
}),
],
});
Available Layouts
Common SmartArt layouts include:
| Layout | Description |
|---|---|
process | Sequential process steps |
cycle | Circular / repeating process |
hierarchy | Organizational hierarchy |
relationship | Radial / relationship diagram |
matrix | Matrix layout |
pyramid | Pyramid / proportional |
list | Vertical list |
chevron | Chevron process flow |
Hierarchy Example
new SmartArtFrame({
x: 0.5,
y: 0.5,
width: 9,
height: 5,
layout: "hierarchy",
data: [
{ text: "CEO" },
{
text: "CTO",
bullets: ["Engineering", "Product"],
},
{
text: "CFO",
bullets: ["Finance", "Accounting"],
},
],
});
Cycle Example
new SmartArtFrame({
x: 1,
y: 1,
width: 7,
height: 4,
layout: "cycle",
data: [
{ text: "Plan" },
{ text: "Design" },
{ text: "Develop" },
{ text: "Test" },
{ text: "Deploy" },
],
});
Styling SmartArt
Control the color scheme and quick style:
new SmartArtFrame({
x: 1,
y: 1,
width: 8,
height: 4,
layout: "process",
data: [{ text: "Phase 1" }, { text: "Phase 2" }, { text: "Phase 3" }],
colorStyle: "accent2_1", // Color scheme
quickStyle: "simple", // Visual style
});
Nested Data with Bullets
new SmartArtFrame({
x: 1,
y: 1,
width: 8,
height: 5,
layout: "list",
data: [
{
text: "Strategy",
bullets: ["Market Analysis", "Competitive Review", "Growth Planning"],
},
{
text: "Execution",
bullets: ["Product Development", "Sales & Marketing"],
},
],
});
Color Styles
Available color style options:
| Value | Description |
|---|---|
"accent1_1" — "accent6_1" | Accent color, variation 1 |
"accent1_2" — "accent6_2" | Accent color, variation 2 |
"accent1_3" — "accent6_3" | Accent color, variation 3 |
"colorful" | Multi-color |
"primary" | Primary theme color |
Quick Styles
| Value | Description |
|---|---|
"simple" | Simple, clean look |
"whiteOutline" | White outline style |
"intense" | Bold, high contrast |
"gradient" | Gradient fill |
"flat" | Flat, no 3D effects |
SmartArtFrame Options
| Option | Type | Description |
|---|---|---|
x | number | Horizontal position in inches |
y | number | Vertical position in inches |
width | number | Width in inches |
height | number | Height in inches |
layout | string | SmartArt layout name |
data | array | Array of { text, bullets? } objects |
colorStyle | string | Color scheme identifier |
quickStyle | string | Visual style identifier |