![]() Setting strokeWeight sets the same value for all four sides. Similar to strokeWeight, these values must be non-negative and can be fractional. You can set individual stroke weights for each of the four sides of a rectangle node or frame-like node. Returns null if the node has no strokes.Īn array of paths representing the object fills relative to the node. However, this method creates and returns a new node while leaving the original intact. This method performs an action similar to using the "Outline Stroke" function in the editor from the right-click menu. The decoration applied to vertices which have only one connected segment. StrokeGeometry is always from the center regardless of the nodes strokeAlign. View more →Ī list of numbers specifying alternating dash and gap lengths, in pixels.Īn array of paths representing the object strokes relative to the node. The alignment of the stroke with respect to the boundaries of the shape. The decoration applied to vertices which have two or more connected segments. This value must be non-negative and can be fractional.įor rectangle nodes or frame-like nodes, individual stroke weights can be set for each side using the following properties: The id of the PaintStyle object that the strokes property of this node is linked to. For help on how to change this value, see Editing Properties. The paints used to fill the area of the shape's strokes. The id of the PaintStyle object that the fills property of this node is linked to. The paints used to fill the area of the shape. Geometry-related properties fills: ReadonlyArray | figma.mixed Setting these corners to different values makes cornerRadius return mixed. Setting cornerRadius sets the property for all four corners. If an edge length is less than twice the corner radius, the corner radius for each vertex of the edge will be clamped to half the edge length. Similar to cornerRadius, these value must be non-negative and can be fractional. You can set individual corner radius of each of the four corners of a rectangle node or frame-like node. View more →Ī value that lets you control how "smooth" the corners are. The number of pixels to round the corners of the object by. The id of the EffectStyle object that the properties of this node are linked to.Ĭorner-related properties cornerRadius: number | figma.mixed A mask node masks its subsequent siblings.Īrray of effects. In addition to the blend modes that paints & effects support, the layer blend mode can also have the value PASS_THROUGH. Must be between 0 and 1.īlend mode of this node, as shown in the Layer panel. Opacity of the node, as shown in the Layer panel. The value in the key-value pair refers to the component property name as returned by componentPropertyDefinitions on the containing component, component set or main component (for instances). A node can only have componentPropertyReferences if it is a component sublayer or an instance sublayer. SetRelaunchData(data: | nullĪll component properties that are attached on this node. Removes this node and all of its children from the document. For debugging purposes only, do not rely on the exact output of this string in production code. ![]() Returns a string representation of the node. If your plugin stays open for a while and stores references to nodes, you should write your code defensively and check that the nodes haven't been removed by the user. Returns true if this node has been removed since it was first accessed. Calling will return the name, read-only, of the current file. The name of the layer that appears in the layers panel. This property is not meant to be directly edited. Parent: ( BaseNode & ChildrenMixin) | null Plugins typically don't need to use this since you can usually just access a node directly. By default, the duplicate will be parented under figma.currentPage.īase node properties id: string Īn internal identifier for a node. The type of this node, represented by the string literal "RECTANGLE"ĭuplicates the rectangle node. Rectangles can be created using figma.createRectangle. A notable feature it has over other kinds of shapes is the ability to specify independent corner radius values. The rectangle is one of the most commonly used shapes in Figma. ![]()
0 Comments
Leave a Reply. |