Skip to main content

Type Interfaces

The PptxGenJS interfaces referenced in surrounding documentation. See the complete list on GitHub.

Position Props (PositionProps)

NameTypeDefaultDescriptionPossible Values
xnumber1.0hor location (inches)0-n
xstringhor location (percent)'n%'. (Ex: {x:'50%'} middle of the Slide)
ynumber1.0ver location (inches)0-n
ystringver location (percent)'n%'. (Ex: {y:'50%'} middle of the Slide)
wnumber1.0width (inches)0-n
wstringwidth (percent)'n%'. (Ex: {w:'50%'} 50% the Slide width)
hnumber1.0height (inches)0-n
hstringheight (percent)'n%'. (Ex: {h:'50%'} 50% the Slide height)

Data/Path Props (DataOrPathProps)

NameTypeDescriptionPossible Values
datastringimage data (base64)base64-encoded image string. (either data or path is required)
pathstringimage pathSame as used in an (img src="") tag. (either data or path is required)
NameTypeDescriptionPossible Values
slidenumberlink to a given slideEx: 2
tooltipstringlink tooltip textEx: Click to visit home page
urlstringtarget URLEx: https://wikipedia.org

Image Props (ImageProps)

OptionTypeDefaultDescriptionPossible Values
hyperlinkHyperlinkPropsadd hyperlinkobject with url or slide
placeholderstringimage placeholderPlaceholder location: title, body
rotateinteger0rotation (degrees)Rotation degress: 0-359
roundingbooleanfalseimage roundingShapes an image into a circle
sizingobjecttransforms imageSee Image Sizing

Media Props (MediaProps)

OptionTypeDescriptionPossible Values
typestringmedia typemedia type: audio or video (reqs: data or path) or online (reqs:link)
linkstringvideo URL(YouTube only): link to online video

Shadow Props (ShadowProps)

NameTypeDefaultDescriptionPossible Values
typestringnoneshadow typeouter, inner, none
anglenumber0blue degrees0-359
blurnumber0blur range (points)0-100
colorstring000000colorhex color code
offsetnumber0shadow offset (points)0-200
opacitynumber0opacity percentage0.0-1.0

Shape Props (ShapeProps)

NameTypeDescriptionPossible Values
alignstringalignmentleft or center or right. Default: left
fillShapeFillPropsfill propsFill color/transparency props
flipHbooleanflip Horizontaltrue or false
flipVbooleanflip Verticaltrue or false
hyperlinkHyperlinkPropshyperlink props(see type link)
lineShapeLinePropsborder line props(see type link)
rectRadiusnumberrounding radius0-180. (only for pptx.shapes.ROUNDED_RECTANGLE)
rotatenumberrotation (degrees)-360 to 360. Default: 0
shadowShadowPropsshadow props(see type link)
shapeNamestringoptional shape nameEx: "Customer Network Diagram 99"

Shape Fill Props (ShapeFillProps)

NameTypeDefaultDescriptionPossible Values
colorstring000000fill colorhex color or scheme color.
transparencynumber0transparencytransparency percentage: 0-100
typestringsolidfill typeshape fill type

Shape Line Props (ShapeLineProps)

NameTypeDefaultDescriptionPossible Values
beginArrowTypestringline endingarrow, diamond, oval, stealth, triangle or none
colorstringline colorhex color or scheme color. Ex: {line:'0088CC'}
dashTypestringsolidline dash styledash, dashDot, lgDash, lgDashDot, lgDashDotDot, solid, sysDash or sysDot
endArrowTypestringline headingarrow, diamond, oval, stealth, triangle or none
transparencynumber0line transparencyPercentage: 0-100
widthnumber1line width (points)1-256. Ex: { width:4 }

Slide Number Props (SlideNumberProps)

OptionTypeDefaultDescriptionPossible Values
colorstring000000colorhex color or scheme color.
fontFacestringfont faceany available font. Ex: { fontFace:'Arial' }
fontSizenumberfont size8-256. Ex: { fontSize:12 }

Text Underline Props (TextUnderlineProps)

NameTypeDescriptionPossible Values
colorstringunderline colorhex color or scheme color.
stylestringunderline styledash, dashHeavy, dashLong, dashLongHeavy, dbl, dotDash, dotDashHeave, dotDotDash, dotDotDashHeavy, dotted, dottedHeavy, heavy, none, sng, wavy , wavyDbl, wavyHeavy