Skip to main content

Hi all. I’m new to Figma and currently working on a project where I’m generating cards using text pulled from a Google Sheet via a plugin like Google Sheets Sync.

The sync is working fine. Each card is receiving the correct text from the sheet. However, I’d like to go a step further and apply specific font colors to certain words or patterns within the text.



Here is the data in sheets:

 

Here’s a screenshot of the cards in Figma:
 

The 2 cards in the frame are populating with the text correctly. However I would like the font to have certain colors based on certain keywords. For example,

  • In Line 1: “Some” and “line” should be red, everything else in line 1 should be white. 
  • In Line 2: “Some” should be red, anything text in bracket should be orange, etc.
     

My Questions:

  • Is this type of partial, inline text formatting (color changes) possible when using data from Google Sheets?
  • Are there any beginner-friendly tips or best practices to achieve this?

I’m hoping to avoid having to manually change the colors of individual words in each card.

Thanks in advance!



Thanks.  

Hi ​@LOkwu ,

 

I’ve been using the google sheets plugin for a while and to the best of my knowledge, there’s no way to conditionally format portions of text within a single imported data field.

You could cut up the string into different data cells to target a specific ordering (ie first word) depending how you cut up the string (could be a lot of manual work to manipulate the data especially if using a large data set), and create an autolayout to bring the sentence together. This way you could style words given a specific order in the sentence, but still, this doesn’t allow you to essentially ‘search’ for specific words or patterns of words to style differently.

Hope that helps.