Search
TextNode
TextNode
A text layer on the canvas.
Methods & Properties
The name of the node displayed in the layers panel.
Whether the node is visible on the canvas.
Whether the node is locked for editing.
Rotation angle in degrees.
Opacity of the node, from 0 (fully transparent) to 1 (fully opaque).
Stacking order of positioned elements.
Font selection for text. Supported by TextNode.
Apply a text style preset.
Positioning behavior of the node. - "relative": Default for nodes in stack/grid layouts - "absolute": Positioned relative to parent - "fixed": Positioned relative to viewport - "sticky": Sticks to viewport edges when scrolling
Distance from top edge when using absolute/fixed positioning.
Distance from right edge when using absolute/fixed positioning.
Distance from bottom edge when using absolute/fixed positioning.
Distance from left edge when using absolute/fixed positioning.
Center anchor horizontal position as percentage (e.g. "50%").
Center anchor vertical position as percentage (e.g. "50%").
Width of the node.
Height of the node.
Maximum width constraint. Supported by FrameNode, TextNode, ComponentInstanceNode.
Minimum width constraint. Supported by FrameNode, TextNode, ComponentInstanceNode.
Maximum height constraint. Supported by FrameNode, TextNode, ComponentInstanceNode.
Minimum height constraint. Supported by FrameNode, TextNode, ComponentInstanceNode.
URL or internal page link.
Whether to open the link in a new tab.
Whether to use smooth scrolling for scroll-to-section links. Supported by FrameNode, TextNode.
Click tracking identifier for analytics. Supported by FrameNode, TextNode.
Array of rel attribute values for the link. Supported by FrameNode, TextNode.
Whether to preserve URL query parameters when navigating. Supported by FrameNode, TextNode.
Whether to fill the grid cell width.
Whether to fill the grid cell height.
Horizontal alignment within grid cell.
Vertical alignment within grid cell.
Number of columns to span, or "all" for all columns.
Number of rows to span.
Controls how content that exceeds the element's box is handled.
Controls horizontal overflow behavior.
Controls vertical overflow behavior.
Maximum number of lines before text is truncated with an ellipsis.
Set the text of this node.
Get the text of this node.
Remove this node from the canvas tree.
Select this node on the canvas.
Clone this node, creating a duplicate in the canvas tree.
Set the attributes of this node.
Get the bounding box of this node.
Pans and zooms the viewport to center the node.
Navigate to this node.
Get the parent of this node in the canvas tree.
Get the children of this node in the canvas tree.
Get descendants of this node that match the given type.
Get the descendants of this node that support attribute.
Get the descendants of this node that have attribute set to a non-null value.
Walk this node and its descendants recursively.
Get plugin data by key.
Set plugin data by key.
Get all plugin data keys stored on this node.