Skip to content

Interface: ConnectorProps ​

A connector is a line drawn between two points, emitted as a PowerPoint connector (<p:cxnSp>) so the app treats it as a connector (selectable/reroutable) rather than a plain line shape. Endpoints are given directly; the bounding box and flip flags are derived.

Properties ​

adj? ​

optional adj?: number | number[]

Bend position(s) as a percent of the connector box (0–100), one value per bend. A single number sets the sole jog of a one-bend elbow / curved; an array sets each jog of a multi-bend connector and its length must equal bends. Values outside 0–100 are allowed (they place the bend beyond the endpoint box, as PowerPoint itself does when endpoints flip). When omitted, PowerPoint uses the preset default (50%).

Emitted as <a:gd name="adj1…" fmla="val …"/> adjust guides (OOXML 1000ths-of-a-percent).


altText? ​

optional altText?: string

Accessibility alt text


beginArrowType? ​

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

Arrowhead at the start point


bends? ​

optional bends?: 2 | 1 | 3

Number of adjustable bends (jogs) for an elbow / curved connector. Selects the preset variant and how many adj values it accepts:

  • 1 → bentConnector3 / curvedConnector3 (one jog) — the default
  • 2 → bentConnector4 / curvedConnector4 (two jogs)
  • 3 → bentConnector5 / curvedConnector5 (three jogs)

Ignored for type: 'straight' (a straight connector has no bends).

Default ​

ts
1

color? ​

optional color?: string

Line color (6-digit hex, no #)

Default ​

ts
'333333'

dashType? ​

optional dashType?: "dash" | "solid" | "dot" | "lgDash" | "dashDot" | "lgDashDot" | "lgDashDotDot" | "sysDash" | "sysDot" | "sysDashDot" | "sysDashDotDot"

Dash style


endArrowType? ​

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

Arrowhead at the end point


endShape? ​

optional endShape?: string

Bind the connector's end point to a shape on the same slide (by objectName). Emits <a:endCxn>. See startShape.


endShapeIdx? ​

optional endShapeIdx?: number

Connection-site index on endShape. Ignored without endShape.

Default ​

ts
0

objectName? ​

optional objectName?: string

Selection Pane object name


startShape? ​

optional startShape?: string

Bind the connector's start point to a shape on the same slide, referenced by that shape's objectName. Emits <a:stCxn id=… idx=…>, so PowerPoint treats the endpoint as attached: it reroutes when the shape moves and its elbow auto-router can engage. The shape's objectName must be set and unique on the slide. x1/y1 remain the static fallback geometry (and are used if the name can't be resolved).

A shape inside a group is a valid target — group children are named on the same slide. The connector itself is not an Slide.addGroup child, but Slide.groupObjects can group one that is already on the slide.


startShapeIdx? ​

optional startShapeIdx?: number

Connection-site index on startShape (0-based; the valid range is preset-dependent — a shape's <a:cxnLst> enumerates its sites). Ignored without startShape.

Default ​

ts
0

type? ​

optional type?: ConnectorType

Routing style

Default ​

ts
'straight'

width? ​

optional width?: number

Line width (pt)

Default ​

ts
1

x1 ​

x1: Coord

Start point X — inches, or a Coord such as '50%' / '2in'


x2 ​

x2: Coord

End point X


y1 ​

y1: Coord

Start point Y


y2 ​

y2: Coord

End point Y