Stroke

Represents a stroke (outline) applied to a shape.

Stroke interface

Represents a stroke (outline) applied to a shape.

Signature:

interface Stroke

Example

// Create 5px solid stroke
group.createStroke({
  fill: {
    type: "SOLID",
    color: { r: 0, g: 0, b: 0 },
  },
  width: 5,
});

Properties

Property

Modifiers

Type

Description

fill

readonly

Paint

The fill paint of the stroke

width

readonly

Animatable<number>

The width of the stroke

Methods

Method

Description

remove()

Removes the stroke from the container it is applied to

Last updated: August 5, 2026 at 11:47 AMEdit this page