Skip to content

@shbernal/ts-pptx


@shbernal/ts-pptx / index / BorderProps

Interface: BorderProps

Defined in: src/types/style.ts:12

Properties

cap?

optional cap?: LineCap

Defined in: src/types/style.ts:57

Line end cap style

Default

ts
'flat'

color?

optional color?: string

Defined in: src/types/style.ts:38

Border color (hex)

Example

ts
'FF3399'

Default

ts
'666666'

dashType?

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

Defined in: src/types/style.ts:32

Dash pattern, using the same vocabulary as ShapeLineProps.dashType.

type is only a coarse three-way switch, so every dashed border it can express collapses onto sysDash. Set this to pick the exact a:prstDash preset instead: dashType: 'lgDashDot' emits <a:prstDash val="lgDashDot"/>.

Precedence. When both are set, dashType wins over type for the dash pattern — { type: 'solid', dashType: 'sysDot' } draws a dotted rule. The one exception is type: 'none', which suppresses the border entirely and is decided before any dash pattern is chosen. An unrecognized value warns and falls back to what type implies.

Default

(derived from type: sysDash for 'dash', else solid)

Example

ts
{ type: 'solid', color: '999999', dashType: 'lgDash' }

transparency?

optional transparency?: number

Defined in: src/types/style.ts:52

Border transparency (percent)

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

Default

ts
0

type?

optional type?: "none" | "dash" | "solid"

Defined in: src/types/style.ts:17

Border type

Default

ts
solid

width?

optional width?: number

Defined in: src/types/style.ts:45

Border width (points)

  • MS-PPT > Format Shape > Fill & Line > Line > Width

Default

ts
1