Skip to main content
Matteo_Gratton
September 29, 2023

Combine string variables in text layers

  • September 29, 2023
  • 15 replies
  • 4943 views

I was trying to find a way to combine more than one string variable together without the need to create to text layers.

My use case is:

  • I have plenty of small string variables with specific details associated with a main variable mode.
  • I have plenty of variables modes.
  • I need to combine some of the variables together to generate a more complex string.

Current possible solutions (both the solutions are not great for various reasons):

  1. Create 2 text layers and connect them with String Variable A and String Variable B.
    [I need to create an auto-layout frame that contains the 2 layers and resize automatically based on text content and if a variable is empty for any reason]
  2. Create a String Variable C that contains String Variable A and String Variable B.
    [I need to copy and paste the content of both Variables A and B into Variable C. If anything change in time for A or B, I have to change also C]

I’d love to have an option to say: this text layer contains Variable A + Variable B (+ can be also a way to add a space, or a character if needed - like you can do in Prototypes when combine different variables).

What do you think? Am I missing anything and overcomplicating something that already works (I was not able to find it!)? 🙏

15 replies

Matt_Rooney
New Member
March 11, 2025

+1 to this one. Two cases specifically:

  1. Inline a variable into the middle of a static string
  2. Expand variable-to-variable referencing to let us build strings like:
    1. $sentence = Welcome to $productname, $username 

       

Our content design folks here at $VeryBigCompany would really like to give us a library of standard terms to align to internal standards, but since we can’t insert variables mid-string or build variables by concatenating other variables, we can’t support that ask.

Pim Tournaye
New Member
April 4, 2025

+1000 to this. Having something like string literals in text layers would be great, especially when testing various terminology or copy.

Mathias_Ole_Brocks
New Member
April 24, 2025

I concur

Pim Tournaye
New Member
May 7, 2025

+1 to this one. Two cases specifically:

  1. Inline a variable into the middle of a static string
  2. Expand variable-to-variable referencing to let us build strings like:
    1. $sentence = Welcome to $productname, $username 

       

Our content design folks here at $VeryBigCompany would really like to give us a library of standard terms to align to internal standards, but since we can’t insert variables mid-string or build variables by concatenating other variables, we can’t support that ask.

I didn’t like how the Dynamic Variables made me do things, so I tried only emulating , so I ended up making my own plugin to achieve this, but a recent Figma update broke it. My version basically tried to hack together string literals in Figma, maybe that’s what you were also looking for.

Should I find some more time to work on this, and delve a bit deeper into the Figma API, I’ll gladly share the plugin here as a bandaid solution while we wait for this to be implemented in Figma natively.

Frank_K
Active Member
November 17, 2025

How is this 2 yrs old and not implemented? How can we design protoypes that work without this functionality?