Figma Plugins

Figma Plugins

  • Introduction
  • API Reference
  • Updates

›Properties

Figma APIs

  • API Reference
  • The Typings File
  • figma
  • figma.ui
  • figma.timer
  • figma.viewport
  • figma.clientStorage
  • figma.parameters
  • API errors

Node APIs

  • Node Types
  • BooleanOperationNode
  • CodeBlockNode
  • ComponentNode
  • ComponentSetNode
  • ConnectorNode
  • DocumentNode
  • EllipseNode
  • EmbedNode
  • FrameNode
  • GroupNode
  • HighlightNode
  • InstanceNode
  • LineNode
  • LinkUnfurlNode
  • MediaNode
  • PageNode
  • PolygonNode
  • RectangleNode
  • SectionNode
  • ShapeWithTextNode
  • SliceNode
  • StampNode
  • StarNode
  • StickyNode
  • TextNode
  • VectorNode
  • WashiTapeNode
  • WidgetNode

Data Types

  • Action
  • ActiveUser
  • ArcData
  • BlendMode
  • ConnectorEndpoint
  • ConnectorStrokeCap
  • Constraints
  • Effect
  • EmbedData
  • ExportSettings
  • FontName
  • Guide
  • HandleMirroring
  • HyperlinkTarget
  • Image
  • LabelSublayer
  • LayoutGrid
  • LetterSpacing
  • LineHeight
  • LinkUnfurlData
  • MediaData
  • OverflowDirection
  • Overlay
  • Paint
  • PublishStatus
  • Reaction
  • Rect
  • RGB/RGBA
  • StrokeCap
  • StrokeJoin
  • StyledTextSegment
  • TextCase
  • TextDecoration
  • TextSublayer
  • Transition
  • Transform
  • Trigger
  • User
  • Vector
  • VectorPath
  • VectorNetwork
  • BaseStyle
  • EffectStyle
  • GridStyle
  • PaintStyle
  • TextStyle

Properties

  • findAll
  • findAllWithCriteria
  • findChild
  • findChildren
  • findOne
  • constraint
  • svgOutlineText
  • scaleFactor
  • swapComponent
  • resize
  • resizeWithoutConstraints
  • flowStartingPoints
  • guides
  • selectedTextRange
  • selection
  • resizeWithoutConstraints
  • rescale
  • resize
  • autoRename
  • characters
  • deleteCharacters
  • getStyledTextSegments
  • insertCharacters
  • textAutoResize
  • data
  • windingRule
  • cloneWidget
  • setWidgetSyncedState
  • closePlugin
  • combineAsVariants
  • commitUndo
  • createBooleanOperation
  • createComponent
  • createConnector
  • createEllipse
  • createFrame
  • createGif
  • createImage
  • createLine
  • createLinkPreviewAsync
  • createPage
  • createPolygon
  • createRectangle
  • createShapeWithText
  • createSlice
  • createStar
  • createSticky
  • createText
  • createVector
  • flatten
  • group
  • loadFontAsync
  • mixed
  • notify
  • off
  • on
  • saveVersionHistoryAsync
  • showUI
  • skipInvisibleInstanceChildren
  • on
  • onmessage
  • postMessage
  • zoom
  • appendChild
  • children
  • constraints
  • cornerRadius
  • cornerSmoothing
  • counterAxisAlignItems
  • counterAxisSizingMode
  • description
  • documentationLinks
  • exportAsync
  • fills
  • fillStyleId
  • findAll
  • findAllWithCriteria
  • findChild
  • findChildren
  • findOne
  • findWidgetNodesByWidgetId
  • id
  • insertChild
  • layoutAlign
  • layoutGrow
  • layoutMode
  • locked
  • name
  • numberOfFixedChildren
  • overflowDirection
  • parent
  • primaryAxisAlignItems
  • primaryAxisSizingMode
  • relativeTransform
  • remove
  • removed
  • rescale
  • resize
  • resizeWithoutConstraints
  • rotation
  • setPluginData
  • setRelaunchData
  • setSharedPluginData
  • strokeAlign
  • strokeCap
  • strokeJoin
  • stuckNodes
  • stuckTo
  • toString
  • visible
  • x
  • y

toString

Returns a string representation of the node. For debugging purposes only, do not rely on the exact output of this string in production code.

Signature

toString(): string

Remarks

This currently returns a string of the form [Node ID] where ID is the id of the node. This is just for debugging convenience so the node displays something useful when converted to a string. We recommend not relying on this in production.

Example:

// e.g. [Node 0:5]
console.log(`Current selected node ${figma.currentPage.selection[0]}`)
← stuckTovisible →
  • Signature
  • Remarks
Learn more about Figma