> For the complete documentation index, see [llms.txt](https://docs.ecwid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ecwid.com/site-themes/develop-site-themes/headers.md).

# Headers

Headers are specialized sections that appear at the top of every page in the storefront. They follow the same structure as regular sections — same folder layout, settings files, entry points, and composables — but with a few additional constraints.

### Differences from Sections <a href="#differences-from-sections" id="differences-from-sections"></a>

| Aspect                | Section               | Header                                      |
| --------------------- | --------------------- | ------------------------------------------- |
| Type                  | `SECTION`             | `HEADER`                                    |
| Mandatory content     | None                  | `menu` (NAVIGATION\_MENU) and `logo` (LOGO) |
| Mandatory design      | None                  | `logo` (LOGO)                               |
| Placement             | Inside template pages | Template configuration `header` slot only   |
| Used in page sections | Yes                   | No                                          |

#### Mandatory Settings <a href="#mandatory-settings" id="mandatory-settings"></a>

Header sections **must** define the following settings with exact key names:

**Content (`content.ts`):**

* `menu` — type `NAVIGATION_MENU` (the site's main navigation)
* `logo` — type `LOGO` (the store's logo)

**Design (`design.ts`):**

* `logo` — type `LOGO` (logo styling: font, size, color, spacing, frame, capitalization)

These are enforced at build time. See [Content Editors](https://docs.ecwid.com/site-themes/develop-site-themes/sections/settings/content-editors.md) and [Design Editors](https://docs.ecwid.com/site-themes/develop-site-themes/sections/settings/design-editors.md) for details on these editor types.

### Template Configuration <a href="#template-configuration" id="template-configuration"></a>

Headers are referenced in the template's `configuration.ts`, not in page sections:

**Default header** (built-in):

```typescript
header: { type: 'default', id: 'header', showcase_id: '1' }
```

**Custom header** (your own section with type `HEADER`):

```typescript
header: { type: 'custom', id: 'my-custom-header', showcase_id: '1' }
```

When using `type: 'custom'`, the referenced section must exist in the `headers/` directory and have `type: 'HEADER'`.

{% hint style="info" %}
**Logo and Menu Carry-Over**

When a merchant applies a new header or a new template with a different header, the existing logo and menu configuration carry over to the new header automatically. This means merchants won't lose their logo or navigation setup when switching headers.
{% endhint %}

### Validation Errors <a href="#validation-errors" id="validation-errors"></a>

| Error                                                           | Cause                                     | Resolution                                     |
| --------------------------------------------------------------- | ----------------------------------------- | ---------------------------------------------- |
| *"Header section must have id 'header' when type is 'default'"* | Default header must use the id `"header"` | Set `id` to `'header'`                         |
| *"Custom header section must exist in headers directory"*       | Referenced custom section not found       | Create the section in the `headers/` directory |
| *"Custom header section must be of type 'HEADER'"*              | Custom section exists but has wrong type  | Set the section's type to `'HEADER'`           |

### Learn more <a href="#further-reading" id="further-reading"></a>

For everything else — settings, showcases, entry points, composables — see [Sections](https://docs.ecwid.com/site-themes/develop-site-themes/sections.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ecwid.com/site-themes/develop-site-themes/headers.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
