Skip to content
New: Customize your theme with an AI assistant. Read the guide

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

src/config/config.toml
[settings.layout]
header = "default" # default | simple | centered
LayoutWhat it looks likeGood for
defaultMega menu with dropdown panels, search, log-in link, and a full-height buttonProducts with many pages
simpleLogo, flat links, one button. A dropdown becomes a single link to its first itemSmall sites and landing pages
centeredLogo left, menu centered in the bar, icon-only search, button rightA 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:

---
title: "Launch week"
headerLayout: "simple"
---
[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".

[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.
  • The sun/moon button switches dark mode. See Colors, Fonts & Dark Mode.

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.

The links and panels come from headerPrimary in src/config/menu.<language>.json. See Menus and 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):

---
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.

Do It With AI

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]".
Type something to search...