Skip to main content
Adriano
Jan 19, 2023 11:22 PM UTC
Question

Borders in different size and colour

I have an Accordion component and would like it to have a border of 1px solid lightblue on all sides, and a thicker border-left of 4px solid darkblue.

How can I achieve this in Figma?
How can I set different thicknesses and different colours on the borders of an object?

This topic has been closed for replies.

7 replies

Sand.on
Jan 19, 2023 11:26 PM UTC
Adriano
AdrianoAuthor
Jan 19, 2023 11:32 PM UTC

The feature allows me to specify the border thickness for a specific edge, which is great.

In my case I need to specify 2 border properties:

  1. The thick 4px on the left
  2. The thin 1px all around
    And I need them to be in different colours.

This is the intended result (currently achieved with grouping, but I would like to keep the component only one object instead of adding a layer only for a border)

Sand.on
Jan 19, 2023 11:51 PM UTC

Got it. You’d have to create two frames. One frame with the full border and white fill, and one frame with the side stroke and no fill. Move the full bordered frame into the other frame so that it layers properly.

Adriano
AdrianoAuthor
Jan 20, 2023 12:35 AM UTC

Cool.

I guess there is no way to achieve this by styling ONE element.

Seems like applying different styles to the border of the same element is impossible in Figma.

Al_Avery
New Participant
Nov 22, 2024 8:21 PM UTC

It would be great to be able to style border separately like you can in CSS. e.g.
border-top-color: black;
border-right-color: gray;
border-bottom-color: pink;
border-left-color: gray;
border-top-width: 2px;
border-right-width: 2px;
border-bottom-width: 4px;
border-left-width: 2px;

KennLucas
Nov 22, 2024 8:44 PM UTC

Figma. On the ball as usual.

Berlinguette_David
New Participant
Apr 29, 2025 6:06 PM UTC

Figma. On the ball as usual.

 

 

To be fair, every time they release a huge improvement (I believe separate widths for each border was incredible, and solved a lot of my problems), it opens the door to “OK, but now, how about this?” I’m going through the same with variables, which again, was huge! But now it’s “where’s my elseIf?” or “can’t I create a for loop to change multiple variables simultaneously?”

But yes, separate border colors as well as multiple borders would make me very happy. Upvote.