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

resizeWithoutConstraints

Resizes the node. Children of the node are never resized, even if those children have constraints. If the parent has auto-layout, causes the parent to be resized (this constraint cannot be ignored).

Signature

resizeWithoutConstraints(width: number, height: number): void

Parameters

width

New width of the node. Must be >= 0.01

height

New height of the node. Must be >= 0.01, except for LineNode which must always be given a height of exactly 0.

Remarks

This function will not cause its children to resize. Use resize if you need to apply constraints.

⚠️ If this node is a text node with a missing font, the text node will be resized but the text will not re-layout until the next time the text node is opened on a machine that has the font. This can cause the text node to re-layout immediately and be surprising to your user. Consider checking the text node property hasMissingFont before using this function.

← resizerotation →
  • Signature
  • Parameters
    • width
    • height
  • Remarks
Learn more about Figma