Skip to content

@shbernal/ts-pptx


@shbernal/ts-pptx / index / GroupProps

Interface: GroupProps

Defined in: src/types/slide.ts:49

Options for slide.addGroup().

The group keeps an identity child coordinate space (chOff/chExt == off/ext) at every depth: children — including nested groups — keep their slide-absolute x/y/w/h. A consequence worth knowing: a group's own frame never moves or scales its children, it only places the selection handle and the rotate pivot.

The frame is all-or-nothing. Pass all four of x/y/w/h to set it explicitly, or none to have it auto-computed as the bounding box of the children. A partial frame is ambiguous, so it warns and falls back to auto-bounds on every axis.

Extends

Properties

altText?

optional altText?: 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:cNvPr descr attribute
  • PowerPoint: [right-click on the object] > "Edit Alt Text..."

Example

ts
'Quarterly revenue bar chart'

Inherited from

ObjectNameProps.altText


flipH?

optional flipH?: boolean

Defined in: src/types/slide.ts:53

Flip the group horizontally


flipV?

optional flipV?: boolean

Defined in: src/types/slide.ts:55

Flip the group vertically


h?

optional h?: Coord

Defined in: src/types/core.ts:49

Height

  • inches or percentage

Examples

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

Inherited from

PositionProps.h


objectLock?

optional objectLock?: 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 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

Examples

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

Inherited from

ObjectNameProps.objectLock


objectName?

optional objectName?: 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

ObjectNameProps.objectName


rotate?

optional rotate?: number

Defined in: src/types/slide.ts:51

Rotation in degrees (applied to the whole group)


w?

optional w?: Coord

Defined in: src/types/core.ts:56

Width

  • inches or percentage

Examples

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

Inherited from

PositionProps.w


x?

optional x?: Coord

Defined in: src/types/core.ts:35

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: src/types/core.ts:42

Vertical position

  • inches or percentage

Examples

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

Inherited from

PositionProps.y