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

Customizing the Header

Files: src/config/config.toml, src/config/menu.<lang>.json, src/i18n/<lang>.json, src/layouts/components/global/header/ · Skill level: Beginner

Looka has one header, so there is no header layout to choose. On the homepage it is dark and sits over the banner. On every other page it is light.

In the Tina edition, you edit these parts at /admin/: Site settings > Settings > Navigation Button and Sticky Header, Menus, and Interface labels > Navigation. In the Sanity edition, the same names are in the Studio: Site settings below the languages, then Menus and Interface labels under each language.

The header contains following essential elements that you can customize using the links below:


To turn the sticky header on or off, open src/config/config.toml and change stickyHeader under [settings]:

src/config/config.toml
[settings]
stickyHeader = true

Customizing the Navigation Button

To enable or edit the navigation button in the header, open the config.toml file in the src/config folder and find the following section:

src/config/config.toml
[settings.navigationButton]
enable = true
label = "" # Leave empty to use the text in each language file
url = "/contact/"
showIcon = "true" # "true" or "false"
# hoverEffect = "text-flip" # "text-flip", "creative-fill", "magnetic", "magnetic-text-flip"

Updating the Button Label

The button label is managed through language files for multilingual support. To change it:

  1. Open src/i18n/en.json, then the same file for each of your other languages, such as src/i18n/fr.json and src/i18n/ar.json.
  2. Locate the "navigation" section.
  3. Update the "buttonLabel" value.
"navigation": {
"buttonLabel": "Get Started"
}

Once updated, your navigation button will display the new label based on the selected language. A value in label in config.toml replaces the text in every language.


Header Files

File, in src/layouts/components/global/header/What it does
Header.astroThe header bar: logo, menu, language switch, button
Navbar.astro, MenuItem.astroThe menu and one top-level item
NavStage.astro, NavStageDropdown.astro, NavStageList.astro, NavStageMega.astroThe desktop panel and its content
DropdownMenu.astro, MegaMenu.astroSubmenus and the mega menu in the mobile menu
NavbarToggler.astroThe button that opens the mobile menu
LanguageSwitcher.astroThe language switch

The logo is src/layouts/components/global/Logo.astro.

Type something to search...