Skip to main content
vernikr
New Participant
Oct 13, 2024 5:57 AM UTC
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
Oct 13, 2024 6:41 AM UTC

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
Oct 13, 2024 6:41 AM UTC

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

Docs: RectangleNode | Plugin API