Referencing String and Number variables in String Variables

Hello. I would like to be able to reference string and number variables inside other string variables, so that I can create a system for content design while editing the files and buildng UIs, not only in the prototype.

Example: The word used for the primary button to advance a step is “Next”. I would like to create variables “term-ui-advance” and “primary-button-advance”, where advance = “Next” and primary-button-next is {{term-ui-advance}}'s value. This way designers have a high level variable that is used on the button and developers have a low level variable that is used in code.

Is there a way to do so in the current beta?

3 Likes

I like this idea… sort of similar to translation keys for the designer. Could be flexible for other use cases as well. For example, when building out a new product, sometimes the terms we use for different concepts/objects are placeholders and change over time.

Say you were building out new feature and weren’t quite sure if you were going to call your new feature an “article”, “post”, or “note”. You might have different variations throughout your designs with different modifiers for CRUD actions or whatever. These might appear in buttons, navigation items, error messages, etc. It would be handy if you could define the entity / label as a variable and change it in one place rather than relying on find and replace.

2 Likes

I’m building a content-heavy prototype and thought I was going to be able to reference String variables in the same way that I can with Color variables!

Hopefully this is on their roadmap!

1 Like

Bumping this so doesn’t get closed.
I’m in need to reference string variables inside string variables for the following type of use case:

We have actions that can be performed in multiple type of resources, so would like to create a string for example for deletion of said resources, something like.

“Deleting this $$resource cannot be undone, are you sure you want to proceed?”
Then allow designers on each specific area of the product replace the “$$resource” variable for whatever they need… but without this resulting in the text detaching from the variable because if we decide to change the warning later on we’d like it to be done across the board.

Finger’s crossed this is a future improvement to existing strings :smiley:

3 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.