What are components in Ditto? Components are text items that are synced across projects and stored in the Component Library for your workspace. Edits to the text or meta-data of a component propagate to all of its instances.
Some key terms to help you get started:
To create your first component, click a text item in a project and select "create or attach component" in the edit panel.
This will open a modal where you can name your new component (or attach it to existing components once you have others in the component library!). You can view all of the components in your workspace by clicking the "Components" tab at the top of the web-app.
To attach a text item to an existing component, select the name of the component in the modal's dropdown. A preview of the component's text will display as a diff from the item's current text.
Once you attach the text to a component, its text will turn into an "instance" of the component. Edits to the text will be synced with all other instances of the component until it is detached.
To detach an instance from its component, click the three dots next to the component name in the edit panel. Click "Detach from component". Once you do this, this text item will become a regular text item, and edits will no longer by synced with the component.
Keep in mind, however, that if a component has no instances (i.e. all of its instances have been detached), it will be removed from your component library.
You can rename a component at any time by selecting the component in the component library and clicking the pen icon next to its name. It'll open a modal where you can rename the component.
When you select text in Figma, you can also attach and create new components from the Ditto Figma plugin.
To use Ditto components in your Figma file, you can drag and drop any of the components on the Components tab onto a frame in your Figma file.
You'll notice a 🟣icon for the text in the layer name. The text node in the file will continue to be synced as a Ditto component!