Use a component in a document

Insert instances, set props and fill slots. Reusable components in the DocStudio designer user guide.

Insert an instance

  1. Open the Library tab. Use the search field to find the component.
  2. Choose a Version.
  3. Press Insert. The component appears in the document and an import is added.

An instance is pinned to the version you chose. Even when a newer version is published, your document keeps using the pinned one until you upgrade.

Set props

Select the instance. In the Content group edit each prop with the expression editor. A prop can be a fixed value or a data path, so the same component shows different content for different data.

Fill slots

In the Layers panel the instance has one region per slot. Drop elements onto a slot region, or select the region and add tools, to put your own content into the component.

View a version

View shows the published template read only with its notes and hash. Use it to learn which props and slots a component expects.

Preview

The canvas expands the component with the pinned version, so the preview shows the real result.

Limits

  • Only top-level text, number, boolean and null sample props are passed to the preview of an instance.
  • A component cannot be edited from the document: open it in authoring mode.