Site Builder: Components
Turn a group of elements into a reusable component in the site builder, insert copies on any page, edit the master once for every copy, override text or links on one copy, add variants and detach a copy, in Easy or Pro mode.
A component is a group of elements you build once and reuse, such as a pricing card or a call-to-action strip. Every copy on your pages is an instance. Edit the component's master and every instance on every page changes. This page walks through creating a component, placing instances, and the instance card with Edit master, Detach, Overrides and Manage variants.
Open the builder
Go to Hosting and open Hosted Apps, then open your site and click Edit in Builder.
Create a component
- On the canvas, select the elements you want to reuse. Select several with Shift-click. They must sit side by side in the same container or section.
- Right-click one of the selected elements.
- Choose Create component from selection.
The selected elements are replaced by one instance of a new component. The new component is named Component 1, Component 2 and so on, one more than the number of components the site already has, and the new instance stays selected. In Easy mode the Element panel opens on its Edit tab, showing the instance card (see Use an instance). Rename the component later in the library (below).
Tablet and phone layout are kept
Create component keeps the selection where it was at every screen size. If you had moved or resized the elements at Tablet or Mobile before creating the component, the instance sits at the same place and size on those screens, and the elements inside it keep their Tablet and Mobile positions. Nothing jumps down the page or reverts to the Desktop width. If you only ever edited Desktop, Tablet and Mobile keep following Desktop as before. See Mobile layout for how screen sizes cascade.
Create component from selection is greyed out when:
- an element in the selection is locked,
- an element in the selection is already a component instance,
- the selected elements are not all in the same container,
- the elements cannot be freely placed, or the selection is inside the site header or footer, or inside a component master you are editing.
The same menu has Save as asset. It saves the selection as a component and opens the Media panel on it. When it is unavailable, the menu explains: "Select unlocked elements on the page (not component instances) to save them as an asset."
Find your components: the Components list
Components are listed in the Media panel of the left rail, under the Components heading, below your uploaded files. Open the Media rail button. If the builder has no media library connected, the Media button is dimmed and the Components list is not available.
Each component row shows a thumbnail, its name, and a line such as "3 elements · Used 2 times" (or "Not used yet"). With no components the list reads "No components yet. Select elements and choose Create component."
- Rename (the pencil icon): type a new name, press Enter or click Save name to keep it, or press Escape or click Cancel to keep the old one.
- Insert: adds a new instance to the page. It goes after the selected element, or at the end of the section if nothing is selected. Insert is dimmed while you are editing a master (the tooltip reads "Finish editing the component (Done) before inserting another copy.") and when no page with a free-form section is open ("Open a page with a canvas section to insert a component.").
- Delete: removes the component. It is dimmed while any instance exists; the tooltip shows how many ("Used 2 times"). Delete or detach every instance first.
Use an instance: the instance card
Select one instance on the canvas. The instance card has the same controls in both modes:
- Component: name is the badge that shows which master the copy belongs to. A long name is cut short with an ellipsis; hover the badge to see the full name.
- Edit master opens the master for editing (see below).
- Detach separates this copy from the component. One undo step.
- Overrides opens the Component overrides popover.
- Variant and Manage variants pick and manage a look for this copy.
Where the card is:
- Easy mode: selecting an instance (including right after Create component from selection) opens the Element panel on its Edit tab, with the card at the top. The panel does not open while another side panel (such as Add, Pages, Layers or Media) is open. Close that panel, then click empty canvas or another element and select the instance again. Press Esc or the panel's close button to close it; it stays closed until you select something else.
- Pro mode: the card is in the header of the inspector on the right.
Both Edit component master and Detach instance are also in the right-click menu of an instance.
Change one copy: Overrides
Click Overrides. The Component overrides popover lists each text, link or image setting the component exposes, with a field for each.
- Type a new value in the field. Link and image fields take a web address.
- A changed setting is marked (Overridden) next to its name. The change applies to this instance only.
- Click Reset beside a field to go back to the master's value. Reset is dimmed until you override that setting.
If the component exposes nothing to change, the popover reads "This component exposes no editable props."
Change every copy: Edit master
- Select an instance and click Edit master. The selection clears, so in Easy mode the Element panel closes; select an element inside the master to edit it.
- A banner above the canvas reads "Editing component master:" followed by the name, and "Changes apply to every instance on every page."
- Edit the elements as you normally would.
- To let an instance's own content go inside the component, select one container in the master and click Make selected container the slot. The button is dimmed unless a container is selected. Click Remove slot on the same container to undo it.
- Click Exit master editing in the banner when you are done, or press Esc. Exiting clears the selection, so click the instance again to keep working on it.
Pro mode: edit the master from the inspector. In Pro mode, select an element inside the master and the inspector on the right shows that element's properties, just as it does on a page.
- Changes you make there are applied to the master, so they show on every instance on every page.
- A resize made in the inspector's width or height fields is one undo step, so one Undo (Cmd or Ctrl+Z) reverts it.
- With nothing from the master selected, the inspector shows the page's settings as usual, and changes made there go to the page, not to the master.
Esc closes things in order. A side panel that is open (Add, Pages, Layers, the Element panel) takes the first Esc and closes. A menu, dialog or list that is open (for example the Component overrides popover) closes first too, and Esc does nothing to master editing while you are typing in a field. Only when none of those is open does Esc leave master editing, so press it once more.
Variants: Manage variants
A variant is a saved look for a component, for example a Primary and an Outline version of a button. Pick one from Variant (Default is the master's own look). The picker is dimmed until the component has a variant. Manage variants opens the Component variants popover where you add, rename, duplicate, delete and edit variants. The full walkthrough is in Component variants.
To add your first variant in Easy mode:
- Select the instance. The Element panel opens on its Edit tab.
- Click Manage variants, type a name in New variant name and click Add variant. Add variant is dimmed until you type a name.
- Change the fields under Look of the variant, then close the popover with Esc. If the cursor is still in a text field, the first Esc leaves the field and saves what you typed, and the popover stays open; press Esc a second time to close it. With no field focused, one press closes it.
- Choose the variant in the Variant picker. Choose Default to go back to the master's look.
A variant belongs to the component, so every copy can pick it. Deleting a variant sends the copies that use it back to Default.
Troubleshooting
Why is Create component from selection greyed out?
Check the list above. The usual causes are a locked element, an element that is already a component instance, or elements from different containers. Select only unlocked, ordinary elements from one container.
Why can't I see the Components list?
The list is part of the Media panel, which needs a media library connected to the builder. When Media is dimmed ("Media: connect a media library to use this"), you can still create and edit components from the canvas, but the list is not shown.
Why can't I delete a component?
Delete is dimmed while any instance uses the component. Detach or delete every instance, then delete the component.
Why don't I see the instance card?
Select a single instance, not several elements. In Easy mode the card is in the Element panel (Edit tab); it does not open while another side panel is open, and re-clicking an instance that is already selected does not reopen it: select something else, then the instance. After you close it with Esc it stays closed until the selection changes. In Pro mode it is in the inspector header. The right-click menu offers Edit component master and Detach instance in either mode.
Why did Esc not leave master editing?
Something else took the Esc: an open side panel, menu, dialog or popover, or a text field you are typing in. Press Esc again, or click Exit master editing in the banner.
Variant is greyed out
The Variant picker is dimmed until the component has at least one variant. Click Manage variants and add one.
After Create component my Tablet or Mobile layout looks wrong
Create component keeps each screen size's position and size. If a copy on a page looks off at Tablet or Mobile, select that screen size and adjust the instance there: edits at Tablet and Mobile apply to that size only.