Skip to content

@shbernal/pptxgenjs


@shbernal/pptxgenjs / index / ObjectOptions

Interface: ObjectOptions

Defined in: core-interfaces.ts:2865

Reusable optional data/path fields. Use DataOrPathRequiredProps for APIs that require at least one source.

Extends

Properties

_bodyProp?

optional _bodyProp?: object

Defined in: core-interfaces.ts:1766

align?

optional align?: TEXT_HALIGN

anchor?

optional anchor?: TEXT_VALIGN

autoFit?

optional autoFit?: boolean

bIns?

optional bIns?: number

lIns?

optional lIns?: number

numCol?

optional numCol?: number

prstTxWarp?

optional prstTxWarp?: string

rIns?

optional rIns?: number

spcCol?

optional spcCol?: number

tIns?

optional tIns?: number

vert?

optional vert?: TextVertType

wrap?

optional wrap?: boolean

Inherited from

TextPropsOptions._bodyProp


_connectorAdj?

optional _connectorAdj?: number[]

Defined in: core-interfaces.ts:2869

Connector adjust-guide values (OOXML 1000ths-of-a-percent), one per bend; emitted as <a:gd name="adjN">


_endCxn?

optional _endCxn?: object

Defined in: core-interfaces.ts:2873

Connector end-point binding: target shape objectName + connection-site index; resolved to <a:endCxn> at serialize time

idx

idx: number

name

name: string


_lineIdx?

optional _lineIdx?: number

Defined in: core-interfaces.ts:1781

Inherited from

TextPropsOptions._lineIdx


_placeholderIdx?

optional _placeholderIdx?: number

Defined in: core-interfaces.ts:2866


_placeholderType?

optional _placeholderType?: PLACEHOLDER_TYPE

Defined in: core-interfaces.ts:2867


_startCxn?

optional _startCxn?: object

Defined in: core-interfaces.ts:2871

Connector start-point binding: target shape objectName + connection-site index; resolved to <a:stCxn> at serialize time

idx

idx: number

name

name: string


_szAuto?

optional _szAuto?: object

Defined in: core-interfaces.ts:2881

Image: which dimensions were omitted by the user and should be derived from the image's natural pixel size at serialize time. Path-based images can't be measured synchronously in addImage() (bytes are loaded async during export), so the missing extent is backfilled once _relsMedia[].data is populated. { w, h } true means "derive this side from the natural ratio". Base64 data images are measured eagerly in addImage() and never set this.

h

h: boolean

w

w: boolean


align?

optional align?: HAlign

Defined in: core-interfaces.ts:1222

Horizontal alignment

Default

ts
'left'

Inherited from

ShapeProps.align


altText?

optional altText?: string

Defined in: core-interfaces.ts:961

Alt Text value ("How would you describe this object and its contents to someone who is blind?")

  • PowerPoint: [right-click on an image] > "Edit Alt Text..."

Inherited from

ShapeProps.altText


angleRange?

optional angleRange?: [number, number]

Defined in: core-interfaces.ts:1230

Radius (only for pptx.shapes.PIE, pptx.shapes.ARC, pptx.shapes.BLOCK_ARC)

  • In the case of pptx.shapes.BLOCK_ARC you have to setup the arcThicknessRatio
  • values: [0-359, 0-359]

Since

v3.4.0

Default

ts
[270, 0]

Inherited from

ShapeProps.angleRange


arcThicknessRatio?

optional arcThicknessRatio?: number

Defined in: core-interfaces.ts:1251

Radius (only for pptx.shapes.BLOCK_ARC)

  • You have to setup the angleRange values too
  • values: 0.0-1.0

Since

v3.4.0

Default

ts
0.5

Inherited from

ShapeProps.arcThicknessRatio


autoFit?

optional autoFit?: boolean

Defined in: core-interfaces.ts:1927

Whether "Fit to Shape?" is enabled

Deprecated

v3.3.0 - use fit

Inherited from

TextPropsOptions.autoFit


autoPageCharWeight?

optional autoPageCharWeight?: number

Defined in: core-interfaces.ts:1425

Auto-paging character weight

  • adjusts how many characters are used before lines wrap
  • range: -1.0 to 1.0

See

https://gitbrent.github.io/PptxGenJS/docs/api-tables.html

Default

ts
0.0

Example

ts
0.5 // lines are longer (increases the number of characters that can fit on a given line)

Inherited from

TableCellProps.autoPageCharWeight


autoPageLineWeight?

optional autoPageLineWeight?: number

Defined in: core-interfaces.ts:1434

Auto-paging line weight

  • adjusts how many lines are used before slides wrap
  • range: -1.0 to 1.0

See

https://gitbrent.github.io/PptxGenJS/docs/api-tables.html

Default

ts
0.0

Example

ts
0.5 // tables are taller (increases the number of lines that can fit on a given slide)

Inherited from

TableCellProps.autoPageLineWeight


baseline?

optional baseline?: number

Defined in: core-interfaces.ts:1783

Inherited from

TextPropsOptions.baseline


bold?

optional bold?: boolean

Defined in: core-interfaces.ts:526

Bold style

Default

ts
false

Inherited from

TableCellProps.bold


border?

optional border?: BorderProps | [BorderProps, BorderProps, BorderProps, BorderProps]

Defined in: core-interfaces.ts:1438

Cell border

Inherited from

TableCellProps.border


breakLine?

optional breakLine?: boolean

Defined in: core-interfaces.ts:531

Add a line-break

Default

ts
false

Inherited from

TableCellProps.breakLine


bullet?

optional bullet?: boolean | { characterCode?: string; code?: string; color?: string; fontFace?: string; image?: { data?: string; path?: string; }; indent?: number; marginPt?: number; numberStartAt?: number; numberType?: "alphaLcParenBoth" | "alphaLcParenR" | "alphaLcPeriod" | "alphaUcParenBoth" | "alphaUcParenR" | "alphaUcPeriod" | "arabicParenBoth" | "arabicParenR" | "arabicPeriod" | "arabicPlain" | "romanLcParenBoth" | "romanLcParenR" | "romanLcPeriod" | "romanUcParenBoth" | "romanUcParenR" | "romanUcPeriod"; size?: number; startAt?: number; style?: string; type?: "number" | "bullet"; }

Defined in: core-interfaces.ts:547

Add standard or custom bullet

  • use true for standard bullet
  • pass object options for custom bullet

Union Members

boolean


Type Literal

{ characterCode?: string; code?: string; color?: string; fontFace?: string; image?: { data?: string; path?: string; }; indent?: number; marginPt?: number; numberStartAt?: number; numberType?: "alphaLcParenBoth" | "alphaLcParenR" | "alphaLcPeriod" | "alphaUcParenBoth" | "alphaUcParenR" | "alphaUcPeriod" | "arabicParenBoth" | "arabicParenR" | "arabicPeriod" | "arabicPlain" | "romanLcParenBoth" | "romanLcParenR" | "romanLcPeriod" | "romanUcParenBoth" | "romanUcParenR" | "romanUcPeriod"; size?: number; startAt?: number; style?: string; type?: "number" | "bullet"; }

characterCode?

optional characterCode?: string

Bullet character code (unicode)

Since

v3.3.0

Example
ts
'25BA' // 'BLACK RIGHT-POINTING POINTER' (U+25BA)
code?

optional code?: string

Bullet code (unicode)

Deprecated

v3.3.0 - use characterCode

color?

optional color?: string

Bullet glyph color (separate from the text run color)

Since

v4.0.0

Example
ts
'FF0000' // red bullet
fontFace?

optional fontFace?: string

Bullet glyph font typeface (<a:buFont/>), e.g. for symbol-font bullets

Since

v4.0.0

Example
ts
'Wingdings' // render `characterCode` using the Wingdings font
image?

optional image?: object

Image to use as the bullet glyph ("picture bullet", <a:buBlip>)

  • supply an image path (filesystem/URL) or base64 data (same forms as addImage())
  • raster formats (PNG/JPG/GIF) are recommended; use size to scale relative to the text height
  • takes precedence over type/characterCode when set
Since

v4.0.0

Examples
ts
image: { path: 'images/star.png' }
ts
image: { data: 'image/png;base64,iVBOR...' }
image.data?

optional data?: string

image.path?

optional path?: string

indent?

optional indent?: number

Indentation (space between bullet and text) (points)

Since

v3.3.0

Default
ts
27 // DEF_BULLET_MARGIN
Example
ts
10 // Indents text 10 points from bullet
marginPt?

optional marginPt?: number

Margin between bullet and text

Since

v3.2.1

Deprecated

v3.3.0 - use indent

numberStartAt?

optional numberStartAt?: number

Number bullets start at

Since

v3.3.0

Default
ts
1
Example
ts
10 // numbered bullets start with 10
numberType?

optional numberType?: "alphaLcParenBoth" | "alphaLcParenR" | "alphaLcPeriod" | "alphaUcParenBoth" | "alphaUcParenR" | "alphaUcPeriod" | "arabicParenBoth" | "arabicParenR" | "arabicPeriod" | "arabicPlain" | "romanLcParenBoth" | "romanLcParenR" | "romanLcPeriod" | "romanUcParenBoth" | "romanUcParenR" | "romanUcPeriod"

Number type

Since

v3.3.0

Example
ts
'romanLcParenR' // roman numerals lower-case with paranthesis right
size?

optional size?: number

Bullet glyph size as a percentage of the run's text size (25–400)

Since

v4.0.0

Default
ts
100
Example
ts
80 // bullet glyph is 80% of the text size
startAt?

optional startAt?: number

Number to start with (only applies to type:number)

Deprecated

v3.3.0 - use numberStartAt

style?

optional style?: string

Number type

Deprecated

v3.3.0 - use numberType

type?

optional type?: "number" | "bullet"

Bullet type

Default
ts
bullet

Default

ts
false

Inherited from

TableCellProps.bullet


caps?

optional caps?: "small" | "all" | "none"

Defined in: core-interfaces.ts:663

Text capitalization

  • 'all' = ALL CAPS
  • 'small' = Small Caps
  • 'none' = no override (default)
  • PowerPoint: Font > Effects > All Caps / Small Caps

Inherited from

TableCellProps.caps


charSpacing?

optional charSpacing?: number

Defined in: core-interfaces.ts:1787

Character spacing

Inherited from

TextPropsOptions.charSpacing


color?

optional color?: string

Defined in: core-interfaces.ts:671

Text color

  • HexColor or ThemeColor
  • MS-PPT > Format Shape > Text Options > Text Fill & Outline > Text Fill > Color

Examples

ts
'FF0000' // hex color (red)
ts
pptx.SchemeColor.text1 // Theme color (Text1)

Inherited from

TableCellProps.color


colspan?

optional colspan?: number

Defined in: core-interfaces.ts:1442

Cell colspan

Inherited from

TableCellProps.colspan


columns?

optional columns?: number

Defined in: core-interfaces.ts:1796

Number of text columns in the text body

  • PowerPoint: Format Shape > Shape Options > Size & Properties > Text Box > Columns > "Number"
  • range: 1-16

Since

v5.3.0

Default

ts
1

Example

ts
2 // flow text into two columns

Inherited from

TextPropsOptions.columns


columnSpacing?

optional columnSpacing?: number

Defined in: core-interfaces.ts:1805

Spacing between text columns (points)

  • PowerPoint: Format Shape > Shape Options > Size & Properties > Text Box > Columns > "Spacing"
  • only applies when columns > 1

Since

v5.3.0

Default

ts
0

Example

ts
10 // 10pt gap between columns

Inherited from

TextPropsOptions.columnSpacing


colW?

optional colW?: number | number[]

Defined in: core-interfaces.ts:2886


crop?

optional crop?: object

Defined in: core-interfaces.ts:1053

Crop the source image to a sub-region by percentage edge insets, emitted verbatim as OOXML <a:srcRect>.

  • each value is the percent (0–100) trimmed off that edge of the source image, the same model PowerPoint's Picture Format > Crop uses; l+r and t+b must each be < 100
  • the remaining sub-region is stretched to fill the picture's displayed w×h box, so this is the faithful way to reproduce a deck that maps several icons out of one composite raster
  • operates on the source image directly (independent of natural-pixel measurement), so unlike sizing: 'crop' (which crops in displayed inches) it works for SVG and unmeasurable formats
  • mutually exclusive with sizing; if both are set crop wins and sizing is ignored

b?

optional b?: number

Percent (0–100) trimmed from the bottom edge of the source image.

Default
ts
0

l?

optional l?: number

Percent (0–100) trimmed from the left edge of the source image.

Default
ts
0

r?

optional r?: number

Percent (0–100) trimmed from the right edge of the source image.

Default
ts
0

t?

optional t?: number

Percent (0–100) trimmed from the top edge of the source image.

Default
ts
0

Example

ts
{ l: 0, t: 0, r: 50, b: 50 } // keep the top-left quadrant of the source image

Inherited from

ImageBaseProps.crop


cx?

optional cx?: Coord

Defined in: core-interfaces.ts:2883


cy?

optional cy?: Coord

Defined in: core-interfaces.ts:2884


data?

optional data?: string

Defined in: core-interfaces.ts:74

base64-encoded string

  • Useful for avoiding potential path/server issues

Example

ts
'image/png;base64,iVtDafDrBF[...]=' // pre-encoded image in base-64

Inherited from

TextPropsOptions.data


duotone?

optional duotone?: object

Defined in: core-interfaces.ts:1123

Recolor the image as a two-tone (duotone) effect

  • maps the image's shadows to shadow and its highlights to highlight
  • serializes <a:duotone> inside the picture's <a:blip> (MS-PPT > Format Picture > Picture Color > Recolor)
  • colors accept HexColor or ThemeColor, same as fills
  • the classic brand treatment: tint stock photography into a single brand hue

highlight

highlight: string

Color mapped to the image's light/highlight tones.

shadow

shadow: string

Color mapped to the image's dark/shadow tones.

Example

ts
{ shadow: '250F6B', highlight: 'FFFFFF' } // deep-blue duotone

Inherited from

ImageBaseProps.duotone


fill?

optional fill?: ShapeFillProps

Defined in: core-interfaces.ts:1258

Shape fill color properties

Examples

ts
{ color:'FF0000' } // hex color (red)
ts
{ color:'0088CC', transparency:50 } // hex color, 50% transparent
ts
{ color:pptx.SchemeColor.accent1 } // Theme color Accent1

Inherited from

ShapeProps.fill


fit?

optional fit?: "resize" | "none" | TextFitShrinkProps | "shrink"

Defined in: core-interfaces.ts:1825

Text fit options

MS-PPT > Format Shape > Shape Options > Text Box > "[unlabeled group]": [3 options below]

  • 'none' = Do not Autofit
  • 'shrink' = Shrink text on overflow
  • 'resize' = Resize shape to fit text

Note 'shrink' and 'resize' only take effect after editing text/resize shape. Both PowerPoint and Word dynamically calculate a scaling factor and apply it when edit/resize occurs.

There is no way for this library to trigger that behavior, sorry. As a workaround, pass an object form of 'shrink' to bake explicit fontScale/lnSpcReduction values into the file so the text renders pre-shrunk without an edit/resize.

Since

v3.3.0

Examples

ts
'shrink' // emit a bare <a:normAutofit/>
ts
{ type: 'shrink', fontScale: 85, lnSpcReduction: 20 } // pre-shrink text

Default

ts
"none"

Inherited from

TextPropsOptions.fit


flipH?

optional flipH?: boolean

Defined in: core-interfaces.ts:966

Flip horizontally?

Default

ts
false

Inherited from

ShapeProps.flipH


flipV?

optional flipV?: boolean

Defined in: core-interfaces.ts:971

Flip vertical?

Default

ts
false

Inherited from

ShapeProps.flipV


fontFace?

optional fontFace?: string

Defined in: core-interfaces.ts:681

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 font

Inherited from

TableCellProps.fontFace


fontFaceEA?

optional fontFaceEA?: string

Defined in: core-interfaces.ts:689

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 JhengHei

Inherited from

TableCellProps.fontFaceEA


fontSize?

optional fontSize?: number

Defined in: core-interfaces.ts:694

Font size

Example

ts
12 // Font size 12

Inherited from

TableCellProps.fontSize


glow?

optional glow?: TextGlowProps

Defined in: core-interfaces.ts:1843

Inherited from

TextPropsOptions.glow


h?

optional h?: Coord

Defined in: core-interfaces.ts:47

Height

  • inches or percentage

Examples

ts
10.25 // height in inches
ts
'75%' // height as percentage of slide size

Inherited from

PositionProps.h


hasBandedColumns?

optional hasBandedColumns?: boolean

Defined in: core-interfaces.ts:2891


hasBandedRows?

optional hasBandedRows?: boolean

Defined in: core-interfaces.ts:2890


hasFirstColumn?

optional hasFirstColumn?: boolean

Defined in: core-interfaces.ts:2892


hasFooter?

optional hasFooter?: boolean

Defined in: core-interfaces.ts:2889


hasHeader?

optional hasHeader?: boolean

Defined in: core-interfaces.ts:2888


hasLastColumn?

optional hasLastColumn?: boolean

Defined in: core-interfaces.ts:2893


highlight?

optional highlight?: string

Defined in: core-interfaces.ts:699

Text highlight color (hex format)

Example

ts
'FFFF00' // yellow

Inherited from

TableCellProps.highlight


optional hyperlink?: HyperlinkProps

Defined in: core-interfaces.ts:972

Add hyperlink to shape

Example

ts
hyperlink: { url: "https://github.com/gitbrent/pptxgenjs", tooltip: "Visit Homepage" },

Inherited from

ShapeProps.hyperlink


indentLevel?

optional indentLevel?: number

Defined in: core-interfaces.ts:1845

Inherited from

TextPropsOptions.indentLevel


inset?

optional inset?: number

Defined in: core-interfaces.ts:1937

Inset

Deprecated

v3.10.0 - use margin

Inherited from

TextPropsOptions.inset


isTextBox?

optional isTextBox?: boolean

Defined in: core-interfaces.ts:1846

Inherited from

TextPropsOptions.isTextBox


italic?

optional italic?: boolean

Defined in: core-interfaces.ts:704

italic style

Default

ts
false

Inherited from

TableCellProps.italic


lang?

optional lang?: string

Defined in: core-interfaces.ts:711

language

  • ISO 639-1 standard language code

Default

ts
'en-US' // english US

Example

ts
'fr-CA' // french Canadian

Inherited from

TableCellProps.lang


line?

optional line?: ShapeLineProps

Defined in: core-interfaces.ts:980

Border line (<a:ln> outline) drawn around the image

  • same options as a shape outline; a picture supports a single outline, not per-side borders
  • MS-PPT: Format Picture > Line

Examples

ts
{ color: '0088CC', width: 2 }                   // 2pt blue border
ts
{ color: '666666', width: 1, dashType: 'dash' } // dashed gray border

Inherited from

ShapeProps.line


lineDash?

optional lineDash?: "dash" | "solid" | "dashDot" | "lgDash" | "lgDashDot" | "lgDashDotDot" | "sysDash" | "sysDot"

Defined in: core-interfaces.ts:1315

Deprecated

v3.3.0

Inherited from

ShapeProps.lineDash


lineHead?

optional lineHead?: "none" | "triangle" | "arrow" | "diamond" | "oval" | "stealth"

Defined in: core-interfaces.ts:1319

Deprecated

v3.3.0

Inherited from

ShapeProps.lineHead


lineSize?

optional lineSize?: number

Defined in: core-interfaces.ts:1311

Deprecated

v3.3.0

Inherited from

ShapeProps.lineSize


lineSpacing?

optional lineSpacing?: number

Defined in: core-interfaces.ts:1853

Line spacing (pt)

  • PowerPoint: Paragraph > Indents and Spacing > Line Spacing: > "Exactly"

Example

ts
28 // 28pt

Inherited from

TextPropsOptions.lineSpacing


lineSpacingMultiple?

optional lineSpacingMultiple?: number

Defined in: core-interfaces.ts:1861

line spacing multiple (percent)

  • range: 0.0-9.99
  • PowerPoint: Paragraph > Indents and Spacing > Line Spacing: > "Multiple"

Example

ts
1.5 // 1.5X line spacing

Since

v3.5.0

Inherited from

TextPropsOptions.lineSpacingMultiple


lineTail?

optional lineTail?: "none" | "triangle" | "arrow" | "diamond" | "oval" | "stealth"

Defined in: core-interfaces.ts:1323

Deprecated

v3.3.0

Inherited from

ShapeProps.lineTail


margin?

optional margin?: Margin

Defined in: core-interfaces.ts:2885

Cell margin (inches)

Default

ts
0

Overrides

TableCellProps.margin


objectLock?

optional objectLock?: ObjectLockProps

Defined in: core-interfaces.ts:819

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 true are 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

Since

v4.0.0

Examples

ts
{ noMove: true, noResize: true } // pin an object in place
ts
{ noGrp: true } // exclude from grouping

Inherited from

ShapeProps.objectLock


objectName?

optional objectName?: string

Defined in: core-interfaces.ts:799

Object name

  • used instead of default "Object N" name
  • PowerPoint: Home > Arrange > Selection Pane...

Since

v3.10.0

Default

ts
'Object 1'

Example

ts
'Antenna Design 9'

Inherited from

ShapeProps.objectName


outline?

optional outline?: object

Defined in: core-interfaces.ts:1872

color

color: string

size

size: number

Inherited from

TextPropsOptions.outline


paraSpaceAfter?

optional paraSpaceAfter?: number

Defined in: core-interfaces.ts:1873

Inherited from

TextPropsOptions.paraSpaceAfter


paraSpaceBefore?

optional paraSpaceBefore?: number

Defined in: core-interfaces.ts:1874

Inherited from

TextPropsOptions.paraSpaceBefore


path?

optional path?: string

Defined in: core-interfaces.ts:67

URL or relative path

Example

ts
'https://onedrives.com/myimg.png` // retrieve image via URL
@example '/home/gitbrent/images/myimg.png` // retrieve image via local path

Inherited from

TextPropsOptions.path


placeholder?

optional placeholder?: string

Defined in: core-interfaces.ts:989

Name of a picture placeholder defined on the slide layout/master to populate

  • when it matches a layout/master placeholder, the image inherits that placeholder's position and size for any of x/y/w/h not supplied explicitly (issue #1258); explicit values always win

Example

ts
'picph'

See

https://docs.microsoft.com/en-us/office/vba/api/powerpoint.ppplaceholdertype

Inherited from

TextPropsOptions.placeholder


points?

optional points?: GeometryPoint[]

Defined in: core-interfaces.ts:1019

Clip the image to an arbitrary freeform path (custGeom)

  • takes precedence over shape / rounding when present
  • coordinates are authored in the image's own inch/EMU space (0..w, 0..h), not slide-relative and not normalized
  • supports the same path DSL as freeform shapes: moveTo / lnTo / cubicBezTo / quadBezTo / arcTo / close

Example

ts
[{ x: 1, y: 0 }, { x: 2, y: 2 }, { x: 0, y: 2 }, { close: true }] // triangular photo clip

Inherited from

ShapeProps.points


rectRadius?

optional rectRadius?: number

Defined in: core-interfaces.ts:1025

Rounded rectangle corner radius (inches) when shape: 'roundRect'

  • values: 0.0 to 1.0

Default

ts
0

Inherited from

ShapeProps.rectRadius


rotate?

optional rotate?: number

Defined in: core-interfaces.ts:996

Image rotation (degrees)

  • range: -360 to 360

Default

ts
0

Example

ts
180 // rotate image 180 degrees

Inherited from

ShapeProps.rotate


rounding?

optional rounding?: boolean

Defined in: core-interfaces.ts:1002

Enable image rounding (clips the image to a circle/ellipse)

  • shorthand for shape: 'ellipse'; shape takes precedence when both are set

Default

ts
false

Inherited from

ImageBaseProps.rounding


rowH?

optional rowH?: number | number[]

Defined in: core-interfaces.ts:2887


rowspan?

optional rowspan?: number

Defined in: core-interfaces.ts:1459

Cell rowspan

Inherited from

TableCellProps.rowspan


rtl?

optional rtl?: boolean

Defined in: core-interfaces.ts:2894


rtlMode?

optional rtlMode?: boolean

Defined in: core-interfaces.ts:1904

Whether to enable right-to-left mode

Default

ts
false

Inherited from

TextPropsOptions.rtlMode


shadow?

optional shadow?: ShadowProps

Defined in: core-interfaces.ts:1040

Shadow Props

  • MS-PPT > Format Picture > Shadow

Example

ts
{ type: 'outer', color: '000000', opacity: 0.5, blur: 20,  offset: 20, angle: 270 }

Inherited from

ShapeProps.shadow


shape?

optional shape?: SHAPE_NAME

Defined in: core-interfaces.ts:1011

Clip the image to a preset shape geometry ("fit image into shape")

  • accepts any PowerPoint preset geometry name, e.g. 'roundRect', 'hexagon', 'ellipse'
  • combine with sizing: { type: 'cover', ... } for an aspect-correct fill of the shape box
  • use rectRadius to set the corner radius for 'roundRect'

Examples

ts
'roundRect' // rounded-rectangle avatar
ts
'hexagon'   // hexagonal photo

Inherited from

TextPropsOptions.shape


shapeAdjust?

optional shapeAdjust?: ShapeAdjustValue | ShapeAdjustValue[]

Defined in: core-interfaces.ts:1033

Preset-geometry adjustment handles (<a:avLst> guides) for the clip shape.

  • tune adjustment handles that lack a dedicated option, e.g. chevron point depth
  • accepts a single guide or an array; each value is a 0.0–1.0 fraction (see ShapeAdjustValue)

Since

v4.0.0

Example

ts
{ name: 'adj', value: 0.25 }

Inherited from

ShapeProps.shapeAdjust


shapeName?

optional shapeName?: string

Defined in: core-interfaces.ts:1328

Shape name (used instead of default "Shape N" name)

Deprecated

v3.10.0 - use objectName

Inherited from

ShapeProps.shapeName


shrinkText?

optional shrinkText?: boolean

Defined in: core-interfaces.ts:1932

Whather "Shrink Text on Overflow?" is enabled

Deprecated

v3.3.0 - use fit

Inherited from

TextPropsOptions.shrinkText


sizing?

optional sizing?: object

Defined in: core-interfaces.ts:1066

Image sizing options

h

h: Coord

Image height

  • inches or percentage
Examples
ts
10.25 // position in inches
ts
'75%' // position as percentage of slide size

type

type: "contain" | "crop" | "cover"

Sizing type

  • cover / contain fit the image into the w×h box using the image's natural pixel aspect ratio (read from the embedded PNG/JPEG/GIF/BMP/WebP header). If the natural size cannot be determined (e.g. SVG or an unrecognized format) the displayed w/h ratio is used as a fallback and a warning is logged.
  • crop cuts a window out of the displayed image using the x/y/w/h offsets.

w

w: Coord

Image width

  • inches or percentage
Examples
ts
10.25 // position in inches
ts
'75%' // position as percentage of slide size

x?

optional x?: Coord

Offset from left to crop image

  • crop only
  • inches or percentage
Examples
ts
10.25 // position in inches
ts
'75%' // position as percentage of slide size

y?

optional y?: Coord

Offset from top to crop image

  • crop only
  • inches or percentage
Examples
ts
10.25 // position in inches
ts
'75%' // position as percentage of slide size

Inherited from

ImageBaseProps.sizing


softBreakBefore?

optional softBreakBefore?: boolean

Defined in: core-interfaces.ts:717

Add a soft line-break (shift+enter) before line text content

Default

ts
false

Since

v3.5.0

Inherited from

TableCellProps.softBreakBefore


strike?

optional strike?: boolean | "dblStrike" | "sngStrike"

Defined in: core-interfaces.ts:1907

Inherited from

TextPropsOptions.strike


subscript?

optional subscript?: boolean

Defined in: core-interfaces.ts:1908

Inherited from

TextPropsOptions.subscript


superscript?

optional superscript?: boolean

Defined in: core-interfaces.ts:1909

Inherited from

TextPropsOptions.superscript


svg?

optional svg?: string

Defined in: core-interfaces.ts:1135

Raw SVG markup to embed as the image source

  • convenience for data: 'data:image/svg+xml;base64,...'; PptxGenJS encodes it for you
  • ignored when data or path is also provided

Example

ts
'<svg viewBox="0 0 24 24">...</svg>'

Inherited from

ImageBaseProps.svg


tableStyle?

optional tableStyle?: string

Defined in: core-interfaces.ts:2895


tabStops?

optional tabStops?: object[]

Defined in: core-interfaces.ts:723

tab stops

  • PowerPoint: Paragraph > Tabs > Tab stop position

alignment?

optional alignment?: "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 inches

Inherited from

TableCellProps.tabStops


textDirection?

optional textDirection?: "horz" | "vert" | "vert270" | "wordArtVert"

Defined in: core-interfaces.ts:732

text direction horz = horizontal vert = rotate 90^ vert270 = rotate 270^ wordArtVert = stacked

Default

ts
'horz'

Inherited from

TableCellProps.textDirection


textWarp?

optional textWarp?: string

Defined in: core-interfaces.ts:540

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.

Since

v4.0.0

Examples

ts
'textArchUp' // bend text along an upward arch (e.g. a label following a ring/arc)
ts
'textCircle'

Inherited from

TableCellProps.textWarp


transparency?

optional transparency?: number

Defined in: core-interfaces.ts:1114

Transparency (percent)

  • MS-PPT > Format Picture > Picture > Picture Transparency > Transparency
  • range: 0-100

Default

ts
0

Example

ts
25 // 25% transparent

Inherited from

TableCellProps.transparency


underline?

optional underline?: object

Defined in: core-interfaces.ts:745

underline properties

  • PowerPoint: Font > Color & Underline > Underline Style/Underline Color

color?

optional color?: string

style?

optional style?: "none" | "dash" | "dashHeavy" | "dashLong" | "dashLongHeavy" | "dbl" | "dotDash" | "dotDashHeave" | "dotDotDash" | "dotDotDashHeavy" | "dotted" | "dottedHeavy" | "heavy" | "sng" | "wavy" | "wavyDbl" | "wavyHeavy"

Default

ts
(none)

Inherited from

TableCellProps.underline


valign?

optional valign?: VAlign

Defined in: core-interfaces.ts:770

vertical alignment

Default

ts
'top'

Inherited from

TableCellProps.valign


vert?

optional vert?: TextVertType

Defined in: core-interfaces.ts:1915

Inherited from

TextPropsOptions.vert


w?

optional w?: Coord

Defined in: core-interfaces.ts:54

Width

  • inches or percentage

Examples

ts
10.25 // width in inches
ts
'75%' // width as percentage of slide size

Inherited from

PositionProps.w


wrap?

optional wrap?: boolean

Defined in: core-interfaces.ts:1921

Text wrap

Since

v3.3.0

Default

ts
true

Inherited from

TextPropsOptions.wrap


x?

optional x?: Coord

Defined in: core-interfaces.ts:33

Horizontal position

  • inches or percentage

Examples

ts
10.25 // position in inches
ts
'75%' // position as percentage of slide size

Inherited from

PositionProps.x


y?

optional y?: Coord

Defined in: core-interfaces.ts:40

Vertical position

  • inches or percentage

Examples

ts
10.25 // position in inches
ts
'75%' // position as percentage of slide size

Inherited from

PositionProps.y