Skip to main content

Text Items & Library Components

Text items in Ditto are strings maintained in your Ditto projects that can be linked to one or more instances of that text in your design files. Editing a text item will also edit all of its linked instances. Each workspace also has a centralized library of components. These function similarly to text items in projects, but allow you to reuse the same text across multiple projects by attaching a library component to one or more project text items. Editing the component or any of its attached instances will update all of its instances.

Developer IDs

Developer IDs in Ditto are unique, (typically) human-readable identifiers for various types of Ditto data, such as projects, text items, library components, component folders, variables, and variants. Developer IDs serve as the unique key for referencing each piece of Ditto data in development, as well as to retrieve desired data from the API and CLI. Developer IDs are generated automatically when an item is created, based on that item’s data. Most items, such as projects and components, will have Developer IDs created based on their initial name, while text items’ will be generated based on their original text content. To preserve stable references between Ditto and your application, once a Developer ID value has been generated, Ditto will not automatically update it when the related data changes. For instance, editing the content of a text item will not affect the text item’s Developer ID. However, you may directly edit the value of a Developer ID from within Ditto at any time.
Important: If you change the value of a Developer ID in Ditto, you will also need to update any references to that Developer ID in your own application. To avoid breaking changes, we recommend making any such edits before you begin using a given item in your code.
Uniqueness In order to function as a suitable key for fetching Ditto data, Developer IDs for a given entity type must be unique within your workspace. No two projects or pieces of text may share a Developer ID (however you may have a project and a text item with the same value). Text items and library components belong to the same pool of Developer ID values; you may not have a library component and an unrelated text item with the same Developer ID, nor can similar text items in different projects share a value. With one exception: library components and their text item instances will all share the same Developer ID. Example: I have a library component with Developer ID, “hello”. I create two text items in two different projects with the text “hello”. These text items will be assigned “hello-1” and “hello-2”. If I then attach both text items to the library component, all three text entities will now share the Developer ID, “hello”. Since text content and metadata is synced between these three text entities, they can safely share the same Developer ID — any data fetched by that ID should be identical across all instances. Project Developer IDs To view and edit a project’s Developer ID, choose Development integration in the main menu found in the top right of a project in the web app. Project Menu Project developer integrations modal Text item and library component Developer IDs:
  1. Select an individual text item or library component
  2. See the Developer ID section in the details panel
CleanShot 2025-08-20 at 12.02.51@2x.png Library Folder Developer IDs:
  1. Visit the parent of a library folder (the folder that contains the one you want to view)
  2. Choose “Folder properties…” from the dropdown menu that appears on the folder in the left sidebar or the main content area
  3. Edit the Developer ID in the details panel
Library folder developer ids Variant Developer ID:
  1. Go to the variant library and select a variant
  2. Edit the Developer ID in the details panel
CleanShot 2025-08-20 at 12.04.28@2x.png

Translation with Variants

Ditto generates localization-ready files using variants, with each variant corresponding to a language/locale. In these files, a single text item (string) can contain multiple variants, making it easy to display different language files to users. To handle localized strings, you can choose to either:
  • Localize in-house by providing translations in the Ditto app
  • Integrate Ditto with a translation management system (either using one of our existing integrations or via our API)
To learn more about localizing with Ditto, check out this guide.

Variable Interpolation

Variable interpolation and dynamic values are handled by variables in Ditto. When fetched by the API/CLI or in manual exports, Ditto will handle variable formatting specific to each string file format.

Pluralization - coming soon

String Import - coming soon

I