Component Templates

Templates allow you to add components that can have preset properties, values, or even different sets of preconfigured children! Why make users add a property they are always going to have to use? Templates allow components to be set up in different configurations and be inserted in those states into your compositions. Templates are created from instances, meaning creating a template is as easy as setting up an instance with the properties configured, to your liking.

A template instance will feature a banner icon that designates it as a template. You can create as many templates as you'd like, they will all show up under their root component in the insert menu.

Creating a template is a wonderful opportunity to highlight a component, taking care in creating good tiles for your component can make life easier for the user by having interactive tiles that will help guide the users as well as setting up the commonly used props.

Components aren't listed in the insert menu, or publishable to the marketplace, without templates. Templates don't need to include every property, which is what the drop-down of documented props is for. Instead, templates should reflect the most common configurations and properties that users will need.

Creating Templates

To create a template simply right-click the root component instance in your composition view that you wish to componentize and select 'Set as Template'.

The content of the frame that contains the template will be the tile that the component features in the Insert menu.

Multiple Templates

You can create as many templates as you'd like for any of your components. The default template can be set via the context menu.

Removing Templates

To remove a template, find the component that you need to remove and right-click it or select the components menu button and look for the 'remove template' option.