Skip to main content
vernikr
New Participant
October 13, 2024
Solved

Set mixed stroke weights

Hi! Is it possible to set mixed stroke weights for a frame? The following code gives me an error

Expected “strokeWeight” to have type number but got object instead

      const m: IndividualStrokesMixin = {
        strokeBottomWeight: 1,
        strokeTopWeight: 2,
        strokeRightWeight: 1,
        strokeLeftWeight: 2,
      };
      figma.currentPage.selection[0].strokeWeight = m;
This topic has been closed for replies.
Gleb
GlebSolution
Power Member
October 13, 2024

These are the properties set directly on the node, not applied to stroke weight as an object.

Docs: RectangleNode | Plugin API

1 reply

Gleb
GlebSolution
Power Member
October 13, 2024

These are the properties set directly on the node, not applied to stroke weight as an object.

Docs: RectangleNode | Plugin API