Skip to main content
Question

Borders in different size and colour

  • January 19, 2023
  • 6 replies
  • 5726 views

Adriano

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?

Sand.on
  • January 19, 2023

Adriano
  • January 19, 2023

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
  • January 19, 2023

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
  • January 20, 2023

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
  • November 22, 2024

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

Figma. On the ball as usual.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings