Skip to content

Interface: ShapeLineProps ​

Line (stroke) options.

A stroke is painted much like a fill: in addition to a solid color, it accepts the inherited gradient and pattern fill options. Setting gradient (or type: 'gradient') paints a gradient stroke, e.g. line: { width: 1, gradient: { kind: 'linear', angle: 0, stops: [{ position: 0, color: 'accent3' }, { position: 100, color: 'accent4' }] } }.

A picture stroke is not one of them, which is why image and type: 'image' are subtracted from the inherited fill props rather than carried. <a:ln>'s paint child is EG_LineFillProperties — a:noFill, a:solidFill, a:gradFill, a:pattFill and nothing else — so unlike a shape interior a stroke has no a:blipFill slot to put a bitmap in, and a package that emitted one is what PowerPoint answers with a repair prompt. The interface carried image from ShapeFillProps regardless, and no call site ever registered the media for it, so a picture stroke reached the emitter with no rel and painted nothing. It is now spelled out as unsupported: a JS caller who sets it anyway gets line/image-fill-unsupported.

A stroke also does not take the bare-colour shorthand a fill does — see FillOption for why. Spell it line: { color: 'FF0000' }.

Extends ​

Properties ​

beginArrowType? ​

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

Begin arrow type — the ST_LineEndType set (a:headEnd/@type).


cap? ​

optional cap?: LineCap

Line end cap style

Default ​

ts
'flat'

color? ​

optional color?: string

Fill color

  • HexColor or ThemeColor

Examples ​

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

Inherited from ​

BackgroundProps.color


dashType? ​

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

Dash type — the full ST_PresetLineDashVal set, so any dash a source deck can carry can also be authored and replicated.

Default ​

ts
'solid'

endArrowType? ​

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

End arrow type — the ST_LineEndType set (a:tailEnd/@type).


gradient? ​

optional gradient?: GradientFillProps

Native PPTX gradient fill options. Setting this (or type: 'gradient') paints the shape interior with a gradient instead of a color.

Inherited from ​

BackgroundProps.gradient


pattern? ​

optional pattern?: PatternFillProps

Native PPTX pattern fill options. Setting this (or type: 'pattern') paints the shape interior with a two-color preset pattern instead of a color.

Inherited from ​

BackgroundProps.pattern


transparency? ​

optional transparency?: number

Transparency (percent)

  • MS-PPT > Format Shape > Fill & Line > Fill > Transparency
  • range: 0-100

Default ​

ts
0

Inherited from ​

BackgroundProps.transparency


type? ​

optional type?: "none" | "inherit" | "pattern" | "solid" | "gradient"

Stroke paint kind. The same vocabulary as ShapeFillProps.type minus 'image', which <a:ln> cannot express (see the note on this interface).

Default ​

ts
'solid'

width? ​

optional width?: number

Line width (pt)

Default ​

ts
1