Figma Developers

Figma Developers

  • Introduction
  • API Reference
  • Updates

›Properties

Figma APIs

  • API Overview
  • The Typings File
  • figma
  • figma.ui
  • figma.viewport
  • figma.clientStorage
  • API errors

Node APIs

  • Node Types
  • BooleanOperationNode
  • ComponentNode
  • DocumentNode
  • EllipseNode
  • FrameNode
  • GroupNode
  • InstanceNode
  • LineNode
  • PageNode
  • PolygonNode
  • RectangleNode
  • SliceNode
  • StarNode
  • TextNode
  • VectorNode

Datatypes

  • ArcData
  • BlendMode
  • Constraints
  • Effect
  • ExportSettings
  • FontName
  • Guide
  • HandleMirroring
  • Image
  • LayoutGrid
  • LetterSpacing
  • LineHeight
  • Paint
  • RGB/RGBA
  • StrokeCap
  • StrokeJoin
  • TextCase
  • TextDecoration
  • Transform
  • Vector
  • VectorPath
  • VectorNetwork
  • BaseStyle
  • EffectStyle
  • GridStyle
  • PaintStyle
  • TextStyle

Properties

  • constraint
  • svgOutlineText
  • findAll
  • findOne
  • guides
  • selection
  • autoRename
  • characters
  • textAutoResize
  • data
  • windingRule
  • closePlugin
  • createBooleanOperation
  • createComponent
  • createEllipse
  • createFrame
  • createLine
  • createPage
  • createPolygon
  • createRectangle
  • createSlice
  • createStar
  • createText
  • createVector
  • flatten
  • group
  • loadFontAsync
  • mixed
  • notify
  • off
  • on
  • showUI
  • on
  • onmessage
  • postMessage
  • zoom
  • appendChild
  • children
  • cornerRadius
  • cornerSmoothing
  • counterAxisSizingMode
  • exportAsync
  • fills
  • fillStyleId
  • findAll
  • findOne
  • id
  • insertChild
  • layoutAlign
  • layoutMode
  • locked
  • name
  • parent
  • relativeTransform
  • remove
  • removed
  • resize
  • resizeWithoutConstraints
  • rotation
  • setPluginData
  • setSharedPluginData
  • strokeAlign
  • strokeCap
  • strokeJoin
  • toString
  • visible
  • x
  • y

strokeAlign

The alignment of the stroke with respect to the boundaries of the shape.

Signature

strokeAlign: "CENTER" | "INSIDE" | "OUTSIDE"

Remarks

Center-aligned stroke means the center of the stroke falls exactly on the geometry. Inside-aligned stroke shifts the stroke so it lies completely inside the shape, and outside-aligned stroke is vice versa.

Inside and outside stroke are actually implemented by doubling the stroke weight and masking the stroke by the fill. This means inside-aligned stroke will never draw strokes outside the fill and outside-aligned stroke will never draw strokes inside the fill.

← setSharedPluginDatastrokeCap →
  • Signature
  • Remarks
Learn more about Figma