Figma String Variables: Manage UI Text in One Place
A string variable is a single source of truth for UI text. Instead of typing text directly, you apply a variable. This is key for managing translations or different component states, like a button label changing from 'Submit' to 'Submitting...'.
Why it exists
Manually updating text across dozens of screens is slow and error-prone. A single typo in a button label could mean hunting it down in multiple places, and ensuring consistency across a large project is a constant battle. String variables were created to centralize text management, ensuring consistency and speed.
The mental model
A string variable is like a named placeholder for text. You create a variable, say welcome_message, and give it a value like "Hello, user!". Then, instead of typing "Hello, user!" in your design, you apply the welcome_message variable to your text layers. The power comes when you need to change it; update the variable once to "Welcome back!" and every connected text layer updates automatically.
How it works
In Figma, you create variables within collections. You'd create a "Strings" collection, then add a new string variable, for example, cta_button_text, with a value of "Get Started". Then, you select a text layer in your design and, in the Text section of the design panel, you apply the cta_button_text variable. The layer's content now displays "Get Started" and is linked to the variable.
When to use it
Use string variables for any text that appears in multiple places or might need to change based on context. This is ideal for button labels, headlines, form field placeholders, and legal copy. It's especially powerful for localization, where you can create a "mode" for each language (e.g., English, Spanish) and switch your entire design's text with one click.
When not to use it
Avoid using string variables for truly unique, one-off content like the body text of a specific article or a user's unique comment in a mockup. The overhead of creating a variable isn't worth it if the text will never be reused or changed system-wide. It's for repeated or swappable text, not all text.
One canonical example
To prepare a design for translation, create a variable collection named "Localization". Add a string variable called greeting with a default value of "Hello". Then, create two modes: "English" and "Spanish". In the "English" mode column, the value for greeting remains "Hello". In the "Spanish" mode column, you set the value to "Hola". By applying this variable to a text layer and switching the frame's mode, you can instantly preview the translated UI without duplicating frames.
Interview question
What is the main advantage of using Figma string variables in a design project?
- a.It automatically optimizes the performance of text rendering in complex prototypes.
- b.It allows designers to create unique, dynamic content for every user interaction.
- c.It enables direct integration with external content management systems for real-time data fetching.
- d.It centralizes text management, ensuring consistency and simplifying updates across multiple instances.Correct
Why? this is the answer
The card emphasizes that string variables "centralize text management, ensuring consistency and speed" and act as a "single source of truth for UI text." Option B is incorrect because the card explicitly advises against using variables for "truly unique, one-off content."
Just read this? Test yourself on what you have been reading.
Read the original → help.figma.com
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on figma — each one lists the topics its interview covers.
See open roles