1

Let me start by saying that I'm a complete ignorant when it comes to Figma, I'm trying to learn the basics in order to draw a couple of very elementary shapes for my research paper.

Is it possible to modify the stroke of a single edge in a rectangle drawn with the rectangle tool in Figma to make it dashed for example?

I don't want to change all the 4 segments of the rectangle, just one of them. If I keep them separated (not in a single vector network) then I cannot "fill" the inside of the rectangle with colour. If I flatten 3 solid vectors and a dashed one then all of them becomes dashed.

2 Answers 2

2

I'm not a Figma user, but doing something like that is usually not possible in vector graphics because the whole vector shape (which is a single closed path) can only have one stroke, and one fill, and only a closed path will display a fill properly. So you can't have individual segments of the same path with a different stroke.

Anyway, here's a workaround:

  1. Create a rectangle with a fill and no stroke.

  2. Create an additional line for one of the edges, then apply a dashed stroke to that.

  3. Create a single path and stroke it if you need a solid outline for the rest of the edges. In most vector image editors there is a Pen tool you can use for this step.

  4. Then the three pieces could be selected and grouped as one.

This is generally how complex vector graphics are constructed. Think of it a bit like a wood working project, with different pieces grouped (or glued) together.

I've included an example below to show you what I mean. This was done in Inkscape but all vector image editors work on the same principles. This shows the different pieces and the group.

enter image description here

1

Even though you can't do that right now on Figma, that's something the team is very aware of. So hopefully we'll be getting that option soon!

Right now, a quick "hack" to archive that goal is by using inner shadow in the object. With 0 blur and changing the position (or side) with the X and Y axis. Inner shadow example

Hope it helps!

1
  • As of May 2022 you now can!
    – skube
    Commented May 12, 2022 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.