> For the complete documentation index, see [llms.txt](https://docs.boii.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.boii.dev/fivem-free-resources/bduk/core-ui/content.md).

# Content

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

The `content` section defines the **main UI area**, supporting **left**, **centre**, and **right** regions. \
Each region can display structured components like input groups or cards, and the layout is fully configurable.

It acts as the core of your UI layout system, with full support for modular pages and responsive content updates.

***

The above image shows the following:&#x20;

🟩 1. Cards in column layout.\
🟥 2. Input Groups\
🟦 3. Cards in Row layout

***

## Configuration

Each content page consists of:

* `index`: (optional) Determines order or default tab position.
* `title`: Displayed in tabs or page headers.
* `layout`: Defines column spans (`left`, `center`, `right`).
* `left`, `center`, `right`: Each region may contain a component block.

```lua
content = {
    pages = {
        my_page = {
            title = "My Page",
            index = 1,
            layout = { left = 2, center = 6, right = 4 },
            left = { type = "cards", title = "Left Section", cards = { ... } },
            center = { type = "input_groups", title = "Center Section", groups = { ... } },
            right = { type = "cards", title = "Right Section", cards = { ... } }
        }
    }
}
```

***

## Content Types

### Cards

Used for displaying visual blocks with optional images, descriptions, hover tooltips, and buttons.

**Example:**

```lua
{
    type = "cards",
    layout = { columns = 1, flex = "row", scroll_x = "scroll", scroll_y = "scroll" },
    title = "Right Section",
    cards = {
        {
            image = "https://placehold.co/64x64",
            title = "Card In Row",
            description = "Card Description.",
            layout = "row",
            on_hover = {
                title = "Card Info",
                description = { "Info descriptions can support arrays", "- like so", "- you get the idea" },
                values = {
                    { key = "Key", value = "Value Pairs" },
                    { key = "Name", value = "Case" }
                },
                actions = {
                    { id = "test_action", key = "E", label = "Action on Keypress", on_keypress = function(data) ... end  }
                },
                rarity = "common"
            },
            buttons = {
                {
                    id = "modal_btn",
                    label = "Modal Button",
                    class = "primary",
                    on_action = function(data) ... end,
                    dataset = {
                        target_id = "example_card",
                        source = "cards_test"
                    },
                    modal = {
                        title = "Modal Title",
                        options = {
                            { id = "name", label = "Name", type = "text" }
                        },
                        buttons = {
                            { id = "modal_button", label = "Modal Button 2", on_action = function(data) ... end }
                        }
                    }
                }
            }
        }
    }
}
```

***

### Input Groups

Used to organize structured form inputs into expandable groupings. \
Can include buttons for submitting or interacting with input data.

**Example:**

```lua
{
  type = "input_groups",
  title = "Input Groups",
  id = "inputs_id",
  layout = { columns = 1 },
  groups = {
    {
      header = "Some Options",
      expandable = false,
      inputs = {
        { id = "opt_1", type = "text", label = "Some Option" },
        { id = "opt_2", type = "number", label = "Another Option" }
      }
    }
  },
  buttons = {
    { id = "input_btn", label = "Input Button", class = "primary", on_action = function(data) ... end }
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
