Appearance
@shbernal/ts-pptx / index / PlaceholderProps
Interface: PlaceholderProps
Defined in: src/types/object.ts:10
Extends
Properties
align?
optionalalign?:HAlign
Defined in: src/types/text.ts:18
Horizontal alignment
Default
ts
'left'Inherited from
altText?
optionalaltText?:string
Defined in: src/types/object.ts:43
Alt Text value ("How would you describe this object and its contents to someone who is blind?")
- serialized to the generated object's
p:cNvPrdescrattribute - PowerPoint: [right-click on the object] > "Edit Alt Text..."
Example
ts
'Quarterly revenue bar chart'Inherited from
bold?
optionalbold?:boolean
Defined in: src/types/text.ts:23
Bold style
Default
ts
falseInherited from
breakLine?
optionalbreakLine?:boolean
Defined in: src/types/text.ts:28
Add a line-break
Default
ts
falseInherited from
bullet?
optionalbullet?:boolean|"inherit"| {characterCode?:string;color?:string;fontFace?:string;image?: {data?:string;path?:string; };indent?:number;numberStartAt?:number;numberType?:"alphaLcParenBoth"|"alphaLcParenR"|"alphaLcPeriod"|"alphaUcParenBoth"|"alphaUcParenR"|"alphaUcPeriod"|"arabicParenBoth"|"arabicParenR"|"arabicPeriod"|"arabicPlain"|"romanLcParenBoth"|"romanLcParenR"|"romanLcPeriod"|"romanUcParenBoth"|"romanUcParenR"|"romanUcPeriod";size?:number;type?:"number"|"bullet"; }
Defined in: src/types/text.ts:53
Add standard or custom bullet
- use
truefor standard bullet - pass object options for custom bullet
false(and omitting the option) is the explicit off: it writes<a:buNone/>plusmarL="0" indent="0", which overrides whatever bullet the layout's or master's list style sets for this level'inherit'states nothing at all — no bullet child and no margin attributes — so the list style keeps reaching the paragraph. This is the one state omission cannot spell, because omitting the option meansfalsehere for compatibility
The margins are only a default of the bullet state: paraMarginLeft and paraIndent state @marL/@indent independently in any of the three, including an inherited margin under a drawn bullet.
Union Members
boolean
"inherit"
Type Literal
{ characterCode?: string; color?: string; fontFace?: string; image?: { data?: string; path?: string; }; indent?: number; numberStartAt?: number; numberType?: "alphaLcParenBoth" | "alphaLcParenR" | "alphaLcPeriod" | "alphaUcParenBoth" | "alphaUcParenR" | "alphaUcPeriod" | "arabicParenBoth" | "arabicParenR" | "arabicPeriod" | "arabicPlain" | "romanLcParenBoth" | "romanLcParenR" | "romanLcPeriod" | "romanUcParenBoth" | "romanUcParenR" | "romanUcPeriod"; size?: number; type?: "number" | "bullet"; }
characterCode?
optionalcharacterCode?:string
Bullet character code (unicode)
Example
ts
'25BA' // 'BLACK RIGHT-POINTING POINTER' (U+25BA)color?
optionalcolor?:string
Bullet glyph color (separate from the text run color)
Example
ts
'FF0000' // red bulletfontFace?
optionalfontFace?:string
Bullet glyph font typeface (<a:buFont/>), e.g. for symbol-font bullets
Example
ts
'Wingdings' // render `characterCode` using the Wingdings fontimage?
optionalimage?:object
Image to use as the bullet glyph ("picture bullet", <a:buBlip>)
- supply an image
path(filesystem/URL) or base64data(same forms asaddImage()) - raster formats (PNG/JPG/GIF) and SVG are supported; use
sizeto scale relative to the text height - SVG bullets embed a PNG preview plus the SVG (the same dual-rel handling as
addImage()) - takes precedence over
type/characterCodewhen set
Examples
ts
image: { path: 'images/star.png' }ts
image: { data: 'image/png;base64,iVBOR...' }ts
image: { path: 'images/star.svg' }image.data?
optionaldata?:string
image.path?
optionalpath?:string
indent?
optionalindent?:number
Indentation (space between bullet and text) (points)
Default
ts
27 // DEF_BULLET_MARGINExample
ts
10 // Indents text 10 points from bulletnumberStartAt?
optionalnumberStartAt?:number
Number bullets start at
Default
ts
1Example
ts
10 // numbered bullets start with 10numberType?
optionalnumberType?:"alphaLcParenBoth"|"alphaLcParenR"|"alphaLcPeriod"|"alphaUcParenBoth"|"alphaUcParenR"|"alphaUcPeriod"|"arabicParenBoth"|"arabicParenR"|"arabicPeriod"|"arabicPlain"|"romanLcParenBoth"|"romanLcParenR"|"romanLcPeriod"|"romanUcParenBoth"|"romanUcParenR"|"romanUcPeriod"
Number type
Example
ts
'romanLcParenR' // roman numerals lower-case with paranthesis rightsize?
optionalsize?:number
Bullet glyph size as a percentage of the run's text size (25–400)
Default
ts
100Example
ts
80 // bullet glyph is 80% of the text sizetype?
optionaltype?:"number"|"bullet"
Bullet type
Default
ts
bulletDefault
ts
falseInherited from
caps?
optionalcaps?:"small"|"all"|"none"
Defined in: src/types/text.ts:149
Text capitalization (a:rPr/@cap, ST_TextCapsType)
'all'= ALL CAPS'small'= Small Caps'none'= the explicit off: it writescap="none", which overrides a capitalization the run would otherwise inherit. Omitting the option states nothing and lets that inheritance stand- PowerPoint: Font > Effects > All Caps / Small Caps
Default
ts
(unset) inheritInherited from
color?
optionalcolor?:string
Defined in: src/types/text.ts:157
Text color
HexColororThemeColor- MS-PPT > Format Shape > Text Options > Text Fill & Outline > Text Fill > Color
Examples
ts
'FF0000' // hex color (red)ts
SchemeColor.text1 // Theme color (Text1)Inherited from
fontFace?
optionalfontFace?:string
Defined in: src/types/text.ts:167
Font face name
Applied to the Latin (<a:latin>) and complex-script (<a:cs>) font slots, matching how PowerPoint writes a font picked from the UI. The East Asian slot (<a:ea>) is left to inherit from the theme unless fontFaceEA is set — forcing a Latin-only face into the East Asian slot duplicates/ghosts text in Office 365.
Example
ts
'Arial' // Arial fontInherited from
fontFaceEA?
optionalfontFaceEA?:string
Defined in: src/types/text.ts:175
East Asian font face name (<a:ea> slot), used to render CJK (Chinese/Japanese/Korean) glyphs
Set this when the East Asian font differs from fontFace. When omitted, <a:ea> inherits the theme East Asian font, which is what PowerPoint does for Latin fonts.
Example
ts
'微軟正黑體' // render East Asian glyphs with Microsoft JhengHeiInherited from
fontSize?
optionalfontSize?:number
Defined in: src/types/text.ts:180
Font size
Example
ts
12 // Font size 12Inherited from
h?
optionalh?:Coord
Defined in: src/types/core.ts:49
Height
- inches or percentage
Examples
ts
10.25 // height in inchests
'75%' // height as percentage of slide sizeInherited from
highlight?
optionalhighlight?:string
Defined in: src/types/text.ts:185
Text highlight color (hex format)
Example
ts
'FFFF00' // yellowInherited from
italic?
optionalitalic?:boolean
Defined in: src/types/text.ts:190
italic style
Default
ts
falseInherited from
lang?
optionallang?:string
Defined in: src/types/text.ts:197
language
- ISO 639-1 standard language code
Default
ts
'en-US' // english USExample
ts
'fr-CA' // french CanadianInherited from
margin?
optionalmargin?:Margin
Defined in: src/types/object.ts:16
margin (inches) — text-frame internal margin; a value >= 1 warns as a likely legacy points value
name
name:
string
Defined in: src/types/object.ts:11
objectLock?
optionalobjectLock?:ObjectLockProps
Defined in: src/types/object.ts:54
Object lock flags (DrawingML a:spLocks / a:picLocks / a:graphicFrameLocks)
- restrict how the object can be manipulated in PowerPoint (e.g. prevent moving, resizing, or grouping)
- each flag maps 1:1 to the OOXML attribute of the same name; only flags set to
trueare emitted - PowerPoint UI: Selection Pane / right-click protections (most locks are honored at edit time, not as a password)
- flags only apply to the object types that support them (see each flag); flags set on an unsupported object type are ignored with a console warning
Examples
ts
{ noMove: true, noResize: true } // pin an object in placets
{ noGrp: true } // exclude from groupingInherited from
objectName?
optionalobjectName?:string
Defined in: src/types/object.ts:36
Object name
- used instead of default "Object N" name
- PowerPoint: Home > Arrange > Selection Pane...
Default
ts
'Object 1'Example
ts
'Antenna Design 9'Inherited from
paraIndent?
optionalparaIndent?:number|"inherit"
Defined in: src/types/text.ts:214
First-line indent (points) — a:pPr/@indent, the offset of the paragraph's FIRST line from paraMarginLeft. Negative hangs the first line to the left of the body, which is what a bulleted paragraph does; positive indents it to the right, the "first line indented" prose form. PowerPoint: Paragraph > Indentation > Special.
'inherit'writes no@indentat all, so the paragraph takes whatever its list style (a:lstStyle→ placeholder → layout → master) sets — the same third state bullet spells, on the attribute beside it- omitting the option keeps the bullet-derived default: a drawn bullet hangs the first line by its margin,
bullet: falsewritesindent="0",bullet: 'inherit'writes nothing - a value here overrides all of those, in every bullet state
Examples
ts
-18 // hang the first line 18pt left of the body textts
18 // indent the first line 18pt, prose stylets
'inherit' // keep the list style's indent, even on a bulleted paragraphInherited from
paraMarginLeft?
optionalparaMarginLeft?:number|"inherit"
Defined in: src/types/text.ts:229
Left margin of the paragraph (points) — a:pPr/@marL, where the paragraph's body text starts. This is the paragraph's own margin, not the text frame's internal padding (margin) and not the discrete outline level (indentLevel, which writes a:p/@lvl). PowerPoint: Paragraph > Indentation > Before text.
'inherit'writes no@marLat all, so the paragraph takes whatever its list style (a:lstStyle→ placeholder → layout → master) sets — the third state that omission cannot spell, since omitting it writes the bullet-derived default- omitting the option keeps that default: a drawn bullet writes its own margin (see
bullet.indent),bullet: falsewritesmarL="0",bullet: 'inherit'writes nothing - a value here overrides all of those, in every bullet state
Examples
ts
36 // body text starts 36pt (0.5in) from the frame's text edgets
'inherit' // keep the list style's margin, even on a bulleted paragraphInherited from
rectRadius?
optionalrectRadius?:number
Defined in: src/types/object.ts:26
Rounded rectangle corner radius (inches) when shape: 'roundRect'
- range: 0.0 to slide height/2
shape?
optionalshape?:SHAPE_NAME
Defined in: src/types/object.ts:21
Preset shape geometry for this placeholder (e.g. 'roundRect')
Default
ts
'rect'softBreakBefore?
optionalsoftBreakBefore?:boolean
Defined in: src/types/text.ts:234
Add a soft line-break (shift+enter) before line text content
Default
ts
falseInherited from
tabStops?
optionaltabStops?:object[]
Defined in: src/types/text.ts:240
tab stops
- PowerPoint: Paragraph > Tabs > Tab stop position
alignment?
optionalalignment?:"r"|"ctr"|"l"|"dec"
position
position:
number
Example
ts
[{ position:1 }, { position:3 }] // Set first tab stop to 1 inch, set second tab stop to 3 inchesInherited from
textDirection?
optionaltextDirection?:"horz"|"vert"|"vert270"|"wordArtVert"
Defined in: src/types/text.ts:249
text direction horz = horizontal vert = rotate 90^ vert270 = rotate 270^ wordArtVert = stacked
Default
ts
'horz'Inherited from
textWarp?
optionaltextWarp?:string
Defined in: src/types/text.ts:36
Preset text warp / WordArt shape (<a:bodyPr><a:prstTxWarp prst="..">), which bends the text along a preset path (arch, circle, wave, …). The value is an OOXML ST_TextShapeType preset name.
Examples
ts
'textArchUp' // bend text along an upward arch (e.g. a label following a ring/arc)ts
'textCircle'Inherited from
transparency?
optionaltransparency?:number
Defined in: src/types/text.ts:256
Transparency (percent)
- MS-PPT > Format Shape > Text Options > Text Fill & Outline > Text Fill > Transparency
- range: 0-100
Default
ts
0Inherited from
type
type:
"media"|"body"|"title"|"chart"|"pic"|"tbl"
Defined in: src/types/object.ts:12
underline?
optionalunderline?:object
Defined in: src/types/text.ts:267
underline properties
- PowerPoint: Font > Color & Underline > Underline Style/Underline Color
styleis the fullST_TextUnderlineTypeenumeration (ECMA-376 §20.1.10.81)'none'is the explicit off: it writesa:rPr/@u="none", which overrides an underline the run would otherwise inherit from its list style, placeholder, layout or master. Omitting the option instead states nothing and lets that inheritance stand — the two are different facts, not two spellings of one.
color?
optionalcolor?:string
style?
optionalstyle?:"none"|"dash"|"dashHeavy"|"dashLong"|"dashLongHeavy"|"dbl"|"dotDash"|"dotDashHeavy"|"dotDotDash"|"dotDotDashHeavy"|"dotted"|"dottedHeavy"|"heavy"|"sng"|"wavy"|"wavyDbl"|"wavyHeavy"|"words"
Default
ts
(unset) inheritInherited from
valign?
optionalvalign?:VAlign
Defined in: src/types/text.ts:293
vertical alignment
Default
ts
'top'Inherited from
w?
optionalw?:Coord
Defined in: src/types/core.ts:56
Width
- inches or percentage
Examples
ts
10.25 // width in inchests
'75%' // width as percentage of slide sizeInherited from
x?
optionalx?:Coord
Defined in: src/types/core.ts:35
Horizontal position
- inches or percentage
Examples
ts
10.25 // position in inchests
'75%' // position as percentage of slide sizeInherited from
y?
optionaly?:Coord
Defined in: src/types/core.ts:42
Vertical position
- inches or percentage
Examples
ts
10.25 // position in inchests
'75%' // position as percentage of slide size