Skip to main content

Property types

In the previous section, we gave you a brief description of the comment types. The client_meta property of comments takes a custom Figma type, which is described below.

Region and FrameOffsetRegion represent comments that span a region. By default, the comment_pin_corner is in the bottom right. As an illustration, the following diagram shows how node_offset, region_height, and region_width interact with each other.

+----------------------------------------+
^node_offset origin |
| |
| +--------------------+ |
| | region_width | |
| | | |
| |region_height | |
| | | |
| | | |
| +--------------------+ <- node_offset |
+----------------------------------------+
TypeProperties

FrameOffset

Position of a comment relative to the frame to which it is attached.

node_idString
Unique id specifying the frame.
node_offsetVector
2d vector offset within the frame from the top-left corner.

Region

Position of a region comment on the canvas.

xNumber
X coordinate of the position.
yNumber
Y coordinate of the position.
region_heightNumber
The height of the comment region. Must be greater than 0.
region_widthNumber
The width of the comment region. Must be greater than 0.
comment_pin_cornerStringdefault: bottom-right

The corner of the comment region to pin to the node's corner as a string enum.

  • bottom-right
  • bottom-left
  • top-right
  • top-left

FrameOffsetRegion

Position of a region comment relative to the frame to which it is attached.

node_idString
Unique id specifying the frame.
node_offsetVector
2D vector offset within the frame from the top-left corner.
region_heightNumber
The height of the comment region.
region_widthNumber
The width of the comment region.
comment_pin_cornerStringdefault: bottom-right

The corner of the comment region to pin to the node's corner, as a string enum.

  • bottom-right
  • bottom-left
  • top-right
  • top-left