Skip to content

@shbernal/ts-pptx


@shbernal/ts-pptx / index / AnimationProps

Interface: AnimationProps

Defined in: src/types/animation.ts:104

A preset build animation on a shape (entrance/emphasis/exit), added via Slide.addAnimation. Target the shape by its 0-based add order (shapeIndex, mapping to the generated spid = shapeIndex + 2) or by objectName. Effects play in the order added, grouped into click steps by trigger.

Properties

durationMs?

optional durationMs?: number

Defined in: src/types/animation.ts:120

Effect duration in milliseconds; preset-specific default when omitted.


objectName?

optional objectName?: string

Defined in: src/types/animation.ts:116

Target shape by its objectName (alternative to shapeIndex). Any shape on the slide, including one inside a group; an unresolved name warns and drops the effect.


preset

preset: PresetEffect

Defined in: src/types/animation.ts:106

The preset effect to play.


shapeIndex?

optional shapeIndex?: number

Defined in: src/types/animation.ts:111

0-based add order of the target shape on the slide (spid = shapeIndex + 2). Counts top-level objects only; use objectName to target a shape inside a group.


trigger?

optional trigger?: AnimationTrigger

Defined in: src/types/animation.ts:118

Trigger relative to the previous effect.

Default

ts
'onClick'