TextLayer.stroke

The stroke applied to the text, if one exists.

TextLayer.stroke property

The stroke applied to the text, if one exists.

Signature:

readonly stroke: TextStroke | undefined;

Remarks

Text layers support at most one stroke. Text strokes are solid only — gradient strokes are not supported. Use TextLayer.createStroke() to create or update the stroke.

Example

const stroke = textLayer.createStroke({
  fill: { type: "SOLID", color: { r: 0, g: 0, b: 0 } },
  width: 2,
});

stroke.width.staticValue = 4;
textLayer.stroke?.remove();
Last updated: October 8, 2026 at 10:45 AMEdit this page