Appearance
@shbernal/ts-pptx / index / ShapeLineProps
Interface: ShapeLineProps
Defined in: src/types/style.ts:201
Line (stroke) options.
A stroke is painted like a fill: in addition to a solid color, it accepts the inherited gradient/pattern/image fill options (DrawingML allows the same fill group inside <a:ln>). 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' }] } }.
Extends
Properties
beginArrowType?
optionalbeginArrowType?:"none"|"triangle"|"diamond"|"arrow"|"oval"|"stealth"
Defined in: src/types/style.ts:221
Begin arrow type
cap?
optionalcap?:LineCap
Defined in: src/types/style.ts:217
Line end cap style
Default
ts
'flat'color?
optionalcolor?:string
Defined in: src/types/style.ts:144
Fill color
HexColororThemeColor
Examples
ts
'FF0000' // hex color (red)ts
SchemeColor.text1 // Theme color (Text1)Inherited from
dashType?
optionaldashType?:"dash"|"dashDot"|"lgDash"|"lgDashDot"|"lgDashDotDot"|"solid"|"sysDash"|"sysDot"|"dot"|"sysDashDot"|"sysDashDotDot"
Defined in: src/types/style.ts:212
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?
optionalendArrowType?:"none"|"triangle"|"diamond"|"arrow"|"oval"|"stealth"
Defined in: src/types/style.ts:225
End arrow type
gradient?
optionalgradient?:GradientFillProps
Defined in: src/types/style.ts:173
Native PPTX gradient fill options.
Inherited from
image?
optionalimage?:ImageFillProps
Defined in: src/types/style.ts:184
Native PPTX picture fill options. Setting this (or type: 'image') fills the shape interior with a stretched bitmap instead of a color.
Inherited from
pattern?
optionalpattern?:PatternFillProps
Defined in: src/types/style.ts:178
Native PPTX pattern fill options.
Inherited from
transparency?
optionaltransparency?:number
Defined in: src/types/style.ts:151
Transparency (percent)
- MS-PPT > Format Shape > Fill & Line > Fill > Transparency
- range: 0-100
Default
ts
0Inherited from
type?
optionaltype?:"none"|"inherit"|"image"|"pattern"|"solid"|"gradient"
Defined in: src/types/style.ts:168
Fill type
'none' and 'inherit' are different states, and both have to be spelled out because omitting fill is not one of them: the shape/text-box emitter defaults a missing fill to <a:noFill/>.
'none'emits<a:noFill/>— an explicit transparent interior.'inherit'emits no fill child at all, leaving the interior top:style/a:fillRefor the placeholder. This is the only way to author that state fromaddShape/addText.
On a table cell (TableCellProps.fill) and a slide background the two spellings differ the same way, except that omitting the option there already means inherit, so 'inherit' is merely the explicit form of the default.
Default
ts
'solid'Inherited from
width?
optionalwidth?:number
Defined in: src/types/style.ts:206
Line width (pt)
Default
ts
1