Readonly
idThe unique identifier of the shape.
The name of the shape.
Readonly
parentThe parent shape. If the shape is the first level the parent will be the root shape. For the root shape the parent is null
The x-coordinate of the shape's position.
The y-coordinate of the shape's position.
Readonly
widthThe width of the shape.
Readonly
heightThe height of the shape.
Readonly
boundsReadonly
centerIndicates whether the shape is blocked.
Indicates whether the shape is hidden.
Indicates whether the shape is visible.
Indicates whether the shape has proportion lock enabled.
The horizontal constraints applied to the shape.
The vertical constraints applied to the shape.
The border radius of the shape.
The border radius of the top-left corner of the shape.
The border radius of the top-right corner of the shape.
The border radius of the bottom-right corner of the shape.
The border radius of the bottom-left corner of the shape.
The opacity of the shape.
The blend mode applied to the shape.
The shadows applied to the shape.
Optional
blurThe blur effect applied to the shape.
The export settings of the shape.
The x-coordinate of the shape relative to its board.
The y-coordinate of the shape relative to its board.
The x-coordinate of the shape relative to its parent.
The y-coordinate of the shape relative to its parent.
Indicates whether the shape is flipped horizontally.
Indicates whether the shape is flipped vertically.
The fills applied to the shape.
The strokes applied to the shape.
Optional
Readonly
layoutLayout properties for children of the shape.
Optional
Readonly
layoutLayout properties for cells in a grid layout.
Readonly
interactionsThe interactions for the current shape.
Readonly
typeThe type of the shape, which is always 'text' for text shapes.
The characters contained within the text shape.
The grow type of the text shape, defining how the text box adjusts its size. Possible values are:
The font ID used in the text shape, or 'mixed' if multiple fonts are used.
The font family used in the text shape, or 'mixed' if multiple font families are used.
The font variant ID used in the text shape, or 'mixed' if multiple font variants are used.
The font size used in the text shape, or 'mixed' if multiple font sizes are used.
The font weight used in the text shape, or 'mixed' if multiple font weights are used.
The font style used in the text shape, or 'mixed' if multiple font styles are used.
The line height used in the text shape, or 'mixed' if multiple line heights are used.
The letter spacing used in the text shape, or 'mixed' if multiple letter spacings are used.
The text transform applied to the text shape, or 'mixed' if multiple text transforms are used.
The text decoration applied to the text shape, or 'mixed' if multiple text decorations are used.
The text direction for the text shape, or 'mixed' if multiple directions are used.
The horizontal alignment of the text shape. It can be a specific alignment or 'mixed' if multiple alignments are used.
The vertical alignment of the text shape. It can be a specific alignment or 'mixed' if multiple alignments are used.
If we know the namespace of an external plugin, this is the way to get their data.
The namespace for the shared data.
The key for which to retrieve the data.
Returns the shared data associated with the key as a string.
If the shape is a component instance, returns the reference to the component associated otherwise will return null
Generates an export from the current shape.
Adds a new interaction to the shape.
Removes the interaction from the shape.
is the interaction to remove from the shape
Applies a typography style to the text shape.
The typography style to apply.
Text represents a text element in the Penpot application, extending the base shape interface. It includes various properties to define the text content and its styling attributes.