Skip to main content
Question

Auto-update font or fill color based on value

  • February 23, 2023
  • 1 reply
  • 597 views

Just wondering if there is any way to set a text style to update based on its value.

I am designing a grid that has a Status column and I want the style of the text to automatically update if the value equals a particular string. In this case, the default is normal weight and black text, but if the value of the text = “Critical”, then I want it to become bold and red.

The reason I want to automate this is that I am importing the data from a CSV so that I do not have to manually enter accurate data in the grid every time I do new design. Currently I can import the data, but I still have to manually set the font weight and color (either manually or by selecting a font style from the design system.

Any help would be appreciated!

This topic has been closed for comments

1 reply

  • 0 replies
  • March 25, 2023

This topic was automatically closed after 30 days. New replies are no longer allowed.


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