Skip to main content

Use percentages for heights, widths, paddings, gutters in auto layout

  • December 9, 2022
  • 101 replies
  • 8683 views

Show first post

101 replies

Mark_Chitty
  • New Member
  • April 3, 2026

Workaround for % based scalable bar-charts (and other scenarios)

Here’s a workaround component for this problem which uses Figma’s grid layout in 10 variants with stepped widths from 100% down to 10%. (It also uses Figma’s new Slot property, but it would work fine with a traditional ‘slot’ component as well). This has worked for me in creating scalable + reusable bar chart components.

My version is limited to 10% increment steps, so you can’t do more fine-grained widths than that, but the principle could be extended for 75:25, 33:66 or any other ratio, or heights instead of widths. You could also have more than 1 slot property so it could work for multi column layouts, etc.