Skip to main content
Nathan_Lindahl
February 24, 2021
Question

How can I center align an icon + text with "fill container"?

  • February 24, 2021
  • 12 replies
  • 8600 views

Hi, new Figma user here,

I have the challenge of creating table cells for my company’s design system. Our tables are primarily for marketing purposes and frequently make use of iconography. Components work great when left aligned.

However, when centered, fill container leaves space between the icon and the text and hug contents won’t wrap:

Any tips?

This topic has been closed for replies.

12 replies

MaxZuman
November 2, 2023

I’d sugest you should design the default state of cell as if the sort icons are there always, just transparent or the same colour as BG to keep yourself from all the troubles of managing the hover states

OR you could play with modes — force all the elements in design mode to switch to hover state with string variable, then test all resizes and combinations and switch variable to default again

November 6, 2023

Thank you, so much. I was trying to find a answer on Internet for this exact problem, all i can find is telling me to do extend container with fill container when objects cannot fill in.