You can customize a component’s section background image per page in Webflow using component slots or custom properties. This is useful when reusing elements like headers that need different visuals depending on the page context.
1. Use a Slot for a Background Section
- When creating your header component, wrap the background section inside a slot.
- This allows you to replace or style that section differently on each page where the component is used.
- To do this: Right-click the background div in the component → choose Set as slot → give it a name (e.g., “Header Background”).
2. Override Background on Each Page
- On each page that uses the header component, locate the slot you assigned (e.g., “Header Background”).
- Use the right-hand Style panel to set a unique background image for that page only.
- This scoped styling won’t affect the base component elsewhere.
3. Use a Style Override on the Component
- Alternatively, give the section inside the header component a combo class when added to a particular page (e.g., “Header Section home-page”).
- Then, define a background image for that combo class. Webflow treats combo classes as more specific, so the background image is page-specific.
- Important: Combo classes work best if you’re not updating the component globally often; slotting remains more flexible.
4. CMS-Driven Image (If Using Webflow CMS)
- If your pages are CMS items (e.g., blog posts or collection pages), bind the background image to a CMS image field using background image binding inside the header component or via slot.
Summary
To set a different background image for a component’s section per page, use slots to expose that section or apply a combo class override for styling. CMS-bound pages can also use dynamic image fields. This approach keeps your header reusable while giving you per-page visual control.