TextLayer

A node representing a text layer.

TextLayer interface

A node representing a text layer.

Signature:

interface TextLayer extends LayerMixin

Extends: LayerMixin

Properties

Property

Modifiers

Type

Description

text

string

The text content of this layer.

type

readonly

"TEXT_LAYER"

Layer type

fontFamily

string

The font family used by this text layer.

fontStyle

string

The font style (e.g. "Regular", "Bold").

fontSize

number

The font size in pixels.

alignment

TextAlignment

Horizontal alignment of the text.

fill

readonly

SolidPaint | undefined

The solid fill paint applied to the text, if any.

stroke

readonly

TextStroke | undefined

The stroke applied to the text, if any.

Methods

Method

Description

createFill(opts)

Creates or replaces the solid fill on this text layer.

createStroke(opts)

Creates or replaces the stroke on this text layer.

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