A component is a group of elements that you use on many pages.
Change the component one time, and every copy — every instance — updates.
This article covers:
- Create a component and use it on other pages
- Props — editable values for each instance
- Slots — areas that each instance can fill
- Variants — style options for each instance
- Dynamic content inside a component
- Components inside components
Note: The Components editor lives in Elements.
See Elements — controls and interactions for the layout.
See The Style panel — controls and interactions for the instance controls in the Style panel.
Create and use a component
- Select one element, or select several elements.
- Right-click the selection. Click Create component.
- Type a name for the component.
- Review the Properties and Variants sections. The app finds the parts that differ between your elements and lists them there. Untick a row to keep that part fixed instead.
- Click Create component.
The app replaces your selection with an instance of the new component.
The component appears in Components.
To use the component again:
- Open the insert list in Elements.
- Open the Custom components category.
- Drop the component on the Design panel.
Edit a component
- Right-click an instance. Click Edit component.
- Elements changes to the Components editor.
- Change the template, styles, properties, slots, or variants.
- Click Done, or click the back action, to return to the page.
Every instance of the component updates with your change.
Props, slots, and variants
A prop is a value that changes per instance. It can be text, rich text, a number, image, link, switch, choice, or filters.
A slot is a named area inside a component that each instance can fill with its own content.
A variant is a named style option for a component. Each instance picks one option per axis.
Open the component editor to add props, slots, and variants. Select an instance to set its values in the Style panel.
Dynamic content inside a component
A component can hold its own dynamic list or dynamic content block, the same way a page can.
Use a Filters prop to let each instance narrow that query further.
- Add a dynamic list inside the component template.
- Add a prop of type Filters.
- Select the list and connect the Filters prop.
- On each instance, set the Filters prop.
Components inside components
A component template can hold an instance of another component. Insert it from Custom components, then select the nested instance to set its props, slots, and variants.