Slot

Learn how slots make it easy to update content without code changes.

Slots are placeholders for content that define where content goes and what type of content you can use, like a hero section, an announcement bar, or a banner that shows related products on a product page.

Slot

Each slot is associated with a specific component that defines its structure. While components are reusable in different contexts, slots are more context-specific.

For example, a Banner component might be shared by multiple slots, such as the Home banner for the homepage and the Product banner slot for product pages.

Default content

Default content is what appears when no personalized or localized content is available, ensuring your application always has something to display.

The default content supports all the features described in the Definition reference, including dynamic values and localization.

Localization

Set a default content for each locale your application supports.

Localization

When you do not provide default content for a specific locale, the default locale content is used instead.

Versioning

We handle versioning automatically for you, just like with components. Whenever you make changes to a component that affect the content structure in a way that could break your application, we create a new version of the component to make sure everything continues to work properly.

This is an overview of the slot versioning process:

  1. You modify the component schema to make the desired changes.

  2. We create a new version with the updated schema and keep the old version untouched.

  3. While you adjust the content of affected slots or experiences, we continue to serve the old version to your application.

  4. Lastly, you bump the version number and apply the necessary changes to your application.

Note that versioning only takes effect if you explicitly specify the slot version in your application code. Until you do, the application will continue to use the content of the specified version.

Croct's mascot buggy
What is the risk of not specifying the version?

Not specifying means you are using the latest version of the slot, so any changes will take effect immediately, potentially breaking your application.