Figma

Easily extract content strings with this Figma plugin

Extract content strings is a Figma plugin that helps you easily surface and extract content strings based on unique IDs in text layer names. This post explains how the plugin works, making it easy to copy, paste, and manage content for development and localization.
Jess Eddy 3 min read
The letter "T" representing text.

Introducing Extract Content Strings – a Figma plugin that helps you surface and extract content strings from your designs. This plugin scans your Figma file for text layer names containing unique IDs, making it easy to copy and paste content strings for use outside of Figma. This post explains how the plugin works and how to manage and export content strings in your design files.

What are content strings?

Developers use content strings to store and manage the text displayed in an application–this allows them to separate the content from the code, helping with consistency, localization, and ease of maintenance.

Why use content strings?

Content strings not only separate code and content but also streamline localization, making it easier to translate UI copy for multilingual support. This method reduces duplication and simplifies managing and updating text, especially in larger projects.

The designer’s role

You may not have directly worked with formal content strings as a designer. Typically, you create content within your designs, followed by an editing and approval phase. Afterward, developers might manually input your content, hardcode it, or—if your team follows a more structured process—export it in a format developers can easily integrate. Here, the plugin becomes invaluable, helping you quickly locate and extract content strings from Figma and streamlining the handoff to developers.

An example YAML file with content strings.

How this plugin works

This plugin scans text layers on the current page of Figma file for content that matches the prefix of the unique ID (e.g., “content_string_”) you define. Most developers rely on prefixes to organize and manage these strings, and a typical content string might look something like this:

key: 'user.profile.settings.modal.description'
value: 'Adjust your profile settings'
context: 'A brief description indicating the purpose of the modal.'

A content string can include additional details, like the “context” in this example, but it must always contain a unique ID (sometimes referred to as a key, ID, or token) and the actual content, often called the value:

key: 'user.profile.settings.modal.description'
value: 'Adjust your profile settings'

Developers use the unique ID in their code to reference and display the corresponding content. This approach is particularly useful when localizing content, allowing teams to manage translations easily. By separating content from the code, developers can easily swap out language-specific strings without disrupting the application.

Demo

0:00
/0:30

How to use this plugin

This plugin requires some initial manual setup to link unique IDs with content. Once configured, you can quickly copy and paste all your content strings!

  1. The plugin scans text layers on the current Figma page for content strings that match the prefix of the unique ID you define (e.g., “content_string_”).
  2. For example, if your content strings begin with “user.profile”, you’ll use that as your prefix.
  • Example unique ID: user.profile.settings.modal.description
  • Your search prefix: user.profile
  1. Ensure the full unique ID is used as the layer name for the corresponding text.
  • Text layer name: user.profile.settings.modal.description

In summary

  1. Define a prefix for your content strings (e.g., “user.profile”).
  2. Ensure the full unique ID is used as the text layer name (e.g., “user.profile.settings.modal.description”).
  3. Enter your prefix and run a search.
  4. The plugin will scan the text layers and match content based on your prefix.
  5. Easily copy and paste the extracted content strings.

Install the plugin

You can view and install the plugin from the Figma Community page.

Test file

Download this test file, which includes content strings in the layer names.

Provide feedback

Feel free to share your feedback anytime—thank you! If you’ve used this plugin in your workflow, I’d love to hear about your experience.

❤️
I’d like to thank Gleb S. for his help collaborating on a review of this app, willingly and kindly sharing his expertise and knowledge and helping me put some finishing touches on the plugin. Check out some of his work, it’s awesome.
The extract content strings Figma plugin in light and dark mode.

Share
Comments
More from Welcome to everyday ux
6 top UI design kits and why to use them (in 2024)
Design tools
members

6 top UI design kits and why to use them (in 2024)

Discover how UI kits can streamline your design process by enabling rapid prototyping, fostering team collaboration, and supporting platform-specific projects. Learn how they help you save time, maintain consistency, and experiment with new ideas cost-effectively.
Jess Eddy 8 min read
24 top Figma plugins in 2024
Figma

24 top Figma plugins in 2024

Enhance your Figma experience with plugins that improve efficiency, boost productivity, help you refine designs, simplify prototyping, and streamline code exports for a better workflow.
Jess Eddy 2 min read

Receive updates

Get updates delivered straight to your inbox, once every two weeks.

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to Welcome to everyday ux.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.