> For the complete documentation index, see [llms.txt](https://docs.atfinity.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.atfinity.io/document-xml-adx/adx-elements/box.md).

# Box

The `<box>` element is a container that wraps its children with padding, background color, and optional borders. It's useful for visually grouping content or creating highlighted sections.

## Example

```xml
<box 
  backgroundColor="#f0f0f0" 
  leftPadding="10mm" 
  rightPadding="10mm"
  topPadding="5mm"
  bottomPadding="5mm"
  borderColor="black"
  borderWidth="1"
>
  <text>This content is inside a box with padding and a border.</text>
  <field title="Name" type="box_below">{{person.name}}</field>
</box>
```

## Attributes

#### `backgroundColor` (optional)

The background color of the box. Can be a named color (e.g., `red`, `white`, `black`) or an RGB value (e.g., `rgb(255, 10, 10)` or `#ff0a0a`).

#### `leftPadding` (optional)

Padding on the left side of the box. Can be specified in pt, mm, or cm (e.g., `10mm`).

#### `rightPadding` (optional)

Padding on the right side of the box. Can be specified in pt, mm, or cm.

#### `topPadding` (optional)

Padding on the top of the box. Can be specified in pt, mm, or cm.

#### `bottomPadding` (optional)

Padding on the bottom of the box. Can be specified in pt, mm, or cm.

#### `borderColor` (optional)

The color of the box border. Can be a named color or RGB value.

#### `borderWidth` (optional)

The width of the box border in points (pt). Default is no border.

## Allowed Children

A `<box>` can contain the following elements:

* `<columns>`
* `<field>`
* `<image>`
* `<keepTogether>`
* `<line>`
* `<pageBreak>`
* `<rect>`
* `<space>`
* `<table>`
* `<text>`

<details>

<summary></summary>

</details>


---

# 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.atfinity.io/document-xml-adx/adx-elements/box.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.
