# Header & Announcement Bar

## Header & Announcement Bar

**Files:** `src/config/config.toml`, `src/config/menu.en.json`, `src/content/sections/english/announcement-bar.md`, `src/layouts/components/global/header/` · **Skill level:** Beginner

In the Tina edition, these settings are under **Site settings > Settings** in `/admin/`, and the bar is **Announcement bar** in **Section defaults**. In the Sanity edition, they are under **Site settings > Settings** in the Studio, and the bar is **Sections > Announcement bar**.

The header is the same on every page (except the log-in, sign-up, and reset screens, which have none): the logo, the menu, a search button, the dark mode switch, a text link ("Log in"), and a button ("Get started"). On small screens the menu folds into a menu button.

### Choose A Header Layout
```toml
# src/config/config.toml
[settings.layout]
  header = "default"   # default | simple | centered
```

| Layout     | What it looks like                                                                    | Good for                         |
| ---------- | ------------------------------------------------------------------------------------- | -------------------------------- |
| `default`  | Mega menu with dropdown panels, search, log-in link, and a full-height button        | Products with many pages         |
| `simple`   | Logo, flat links, one button. A dropdown becomes a single link to its first item      | Small sites and landing pages    |
| `centered` | Logo left, menu centered in the bar, icon-only search, button right                  | A balanced, minimal look         |

All three read the same menu file, so you can switch at any time. To use another layout on **one page**, add it to that page's frontmatter:

```yaml
---
title: "Launch week"
headerLayout: "simple"
---
```

### The Button And The Link
```toml
[settings.navigationButton]
  enable = true
  label  = ""          # empty uses navigation.buttonLabel from src/i18n/en.json ("Get started")
  url    = "/signup/"

[settings.navigationSecondaryLink]   # the text link before the button (default and centered layouts)
  enable = true
  label  = ""          # empty uses navigation.secondaryLabel ("Log in")
  url    = "/login/"
```

To change the words, edit `navigation` in `src/i18n/en.json` and the file for each other language. To point them at your real app, change `url`, for example `"https://app.example.com/login"`.

### Sticky Header
```toml
[settings]
  stickyHeader = true   # the header stays at the top while scrolling
```

The announcement bar scrolls away; the header stays pinned.

### Search And Dark Mode Buttons
- The search button opens the ⌘K / Ctrl+K search modal. Turn it off with `[settings.search] enable = false`. See [Search](/kivo/customization/search/).
- The sun/moon button switches dark mode. See [Colors, Fonts & Dark Mode](/kivo/customization/colors-fonts/).

The language switch is in the footer, in all three footer layouts, and in the mobile menu. The log-in, sign-up, and reset screens have their own. It lists every language in `src/config/language.json`.

### Menu Links
The links and panels come from `headerPrimary` in `src/config/menu.<language>.json`. See [Menus](/kivo/customization/menus/) and [Navigation](../../features/navigation/).

For developers: `Header.astro` picks the layout and `SaasHeader.astro` draws the bar, both in `src/layouts/components/global/header/`, with the menu in `Navbar.astro` and the panel in `NavStage.astro` beside them.

### Announcement Bar
The thin strip above the header. Edit `src/content/sections/english/announcement-bar.md` (and the file for each other language):

```yaml
---
enable: true   # false hides the bar
text: "New: preview environments can now start from a database snapshot."
link:
  enable: true
  label: "See what changed"
  url: "/changelog/2026-08-preview-database-snapshots/"
---
```

`text` accepts Markdown, so `**bold**` works. Use it for launches, events, or a sale, and set `enable: false` when you have nothing to announce.

<Aside type="note">
  The hero has its own small announcement pill above the title
  (`announcement:` in `hero-saas.md`). It is separate from this bar.
</Aside>

### Do It With AI
```text
Switch the header to the [simple | centered] layout in src/config/config.toml. Point the header
button to "[URL]" with the label "[LABEL]" and the log-in link to "[URL]", in every language
(update navigation in each file in src/i18n/). Change the announcement bar in
src/content/sections/<language>/announcement-bar.md to: "[TEXT]" linking to "[URL]".
```