# Header

<figure><img src="/files/CovqyBEfeqgGgWNJNVI0" alt=""><figcaption></figcaption></figure>

The `header` is the topmost part of the BDUK layout system. It is fully modular, with **three alignable sections** (`left`, `center`, and `right`) — you can place any supported component into any section.

***

## Structure

You define a `header` section using the following structure:

```lua
header = {
    layout = {
        left = { justify = "flex-start" },
        center = { justify = "center" },
        right = { justify = "flex-end" },
    },
    elements = {
        left = {
            {
                type = "group",
                items = {
                    { type = "logo", image = "bd_100.png" },
                    { type = "text", title = "BOII", subtitle = "UI Builder" }
                }
            }
        },
        center = {
            { type = "tabs" }
        },
        right = {
            {
                type = "namecard",
                avatar = "avatar_placeholder.jpg",
                background = "namecard_bg_4.jpg",
                name = "Player Name",
                title = "Some Player Title",
                level = 99,
                tier = "bronze"
            }
        }
    }
}
```

Each section (`left`, `center`, `right`) can be **included or omitted**, and you can insert any UI components inside — no limitations.

***

## Supported Elements

You can use any of the following types in **any** of the three header sections:

| `type`     | Description                                                  |
| ---------- | ------------------------------------------------------------ |
| `logo`     | Displays a logo image via background.                        |
| `text`     | Title + optional subtitle, stacked vertically.               |
| `tabs`     | Auto-generated tab navigation from `content.pages`.          |
| `button`   | Single-action button element.                                |
| `buttons`  | Button group using the `Buttons` class.                      |
| `group`    | A horizontal wrapper that nests multiple child elements.     |
| `namecard` | Visual identity block with avatar, name, title, tier, level. |

***

## Alignment Control

Each section's alignment can be styled independently using:

```lua
layout = {
    left = { justify = "flex-start", align = "center", gap = "1vw" },
    ...
}
```

These values map directly to Flexbox properties for layout precision.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.boii.dev/fivem-free-resources/bduk/core-ui/header.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
