# Customizing Menus

## **Customizing Menus**

**Files:** `src/config/menu.<lang>.json` (Astro and Tina editions) · **Skill level:** Beginner

In Tina, these are **Header Primary**, **Topbar**, and **Footer** under **Menus** at `/admin/`, and in Sanity they are **Header menu**, **Top bar links**, and **Footer menu** under your language's **Menus** in the Studio.

Lumio has one menu file for each language: `menu.en.json`, `menu.fr.json`, and `menu.ar.json`. Each has three lists. For how the menu behaves and its keyboard support, see [Navigation](../../features/navigation/).

| Key | What it is | Where it shows |
| --- | ---------- | -------------- |
| `headerPrimary` | The main menu, with dropdowns, flyouts, and the mega menu | Every header, and the mobile menu |
| `topbar` | A few small links | The top bar in `HeaderTwo` and `HeaderThree` |
| `footer` | Link columns, each with a `label` and a `list` | The footers |

### **Header Menu**

```json
{
  "headerPrimary": [
    {
      "enable": true,
      "name": "Home",
      "weight": 0,
      "url": "/"
    },
    {
      "name": "Pages",
      "enable": true,
      "weight": 2,
      "hasChildren": true,
      "children": [
        { "enable": true, "name": "About", "url": "/about/", "weight": 0 }
      ]
    }
  ]
}
```

Give any child its own `"hasChildren": true` and `children`, and it opens to the side. Nest as deep as you like.

### **Order Of The Items**

`headerPrimary` is sorted by `weight`, in `Navbar.astro`, so a lower number comes first. That covers top-level items, dropdown links at every level, mega menu columns, and their links. Items with the same `weight` keep their order in the file.

`topbar` and `footer` show in file order. Their `weight` values change nothing, so move the item in the file instead.

### **Top Bar Links**

```json
{
  "topbar": [
    { "enable": true, "name": "Help", "url": "/", "weight": 0 },
    { "enable": true, "name": "Support", "url": "/", "weight": 0 }
  ]
}
```

They ship pointing at `/`, so set your own addresses.

### **Footer Menus**

```json
{
  "footer": [
    {
      "label": "Links",
      "list": [
        { "enable": true, "name": "Home", "url": "/", "weight": 0 }
      ]
    },
    {
      "label": "Services",
      "list": [
        { "enable": true, "name": "App Development", "url": "/services/", "weight": 0 }
      ]
    }
  ]
}
```

- `Footer.astro` shows every column.
- `FooterTwo.astro` shows only the first five links of the first column, under `footerBlock.quickLinksLabel`.
- The footers don't read `enable`, so delete a footer link to remove it.

### **Configuration Options**

- `name`: Visible menu label.
- `url`: Link target. The language prefix is added for you.
- `enable`: Must be `true` for an item to show in the header menus and the top bar. Set it to `false` to hide the item, at any level.
- `weight`: Sorts everything in `headerPrimary`.
- `hasChildren`: Turns on `children`, for a dropdown.
- `hasMegaMenu`: Turns on `menus`, for a mega menu.
- `icon`: An icon name, used on mega menu links in the mobile menu.
- `badge`: A small label or dot beside the item, with `enable`, `label`, `color`, and `type` (`text` or `dot`).
- `cta`: The photo card in the mega menu.
- `bar`: The row along the bottom of the mega menu.

### **Mega Menu Groups**

Lumio’s mega menu does not pull a services list automatically. Each column is written in the `menus` array, so it can point to any page without changing component code.

```json
{
  "enable": true,
  "name": "Services",
  "weight": 1,
  "hasMegaMenu": true,
  "menus": [
    {
      "enable": true,
      "name": "Core Services",
      "weight": 0,
      "children": [
        {
          "enable": true,
          "name": "Web Platforms",
          "icon": "Monitor",
          "url": "/services/",
          "weight": 0
        }
      ]
    }
  ]
}
```

The sample menu files also have a `description` on columns and links. The theme doesn't show it.

### **Mega Menu Card And Bottom Row**

```json
"cta": {
  "enable": true,
  "eyebrow": "Delivery Partner",
  "image": "/images/case-studies/case-study-1.jpg",
  "title": "Need a team that can design, build, and launch without extra layers?",
  "description": "Use the menu to explore service lines, then move to a real scope conversation when the fit is clear.",
  "items": ["Strategy, design, and engineering in one workflow"],
  "button": { "enable": true, "label": "Start a Project", "url": "/contact/" }
},
"bar": {
  "enable": true,
  "text": "Not sure which service fits?",
  "label": "Talk to our team",
  "url": "/contact/"
}
```

The bottom row also shows the phone number from `[contact]` in `config.toml`.

### **Adding New Menu Items**

1. Open `src/config/menu.<lang>.json`. Change every language, so the menus stay in step.
2. Find the list you want to extend: `headerPrimary`, `topbar`, or `footer`.
3. Add a new object with `enable`, `name`, `url`, and any optional fields such as `badge`.

### **Disabling Menu Items**

To hide a header or top bar item, set `enable` to `false`:

```json
{
  "enable": false,
  "name": "Old Page",
  "url": "/old-page/"
}
```

This removes it from the navigation without deleting it.