Duplicate and replace

Duplicate a component and make changes to the copy.

Use this approach when you need to change a component without affecting all the places it is used.

For example, suppose you have a component for a call-to-action button that you use in many places across your content. This component has a link attribute that contains a label and a URL. But now you need a new attribute to control its style only in the hero section.

In this case, the best approach is to duplicate the original component and make the necessary changes to the copy. Then, update the places that need the changes to use the copy instead of the original component.

Here are the steps to follow:

  1. Go to the  Components page  and find the component you want to modify.
  2. Click Options (), then click  Duplicate component.
  3. Enter a name and slug for the new component.

  4. Make any necessary changes.

  5. Click Save to create the component.
  6. Update the places that need the changes to use the copy instead.