> 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/rect.md).

# Rect

The `<rect>` can be used to display a rectangle in a certain color.

It can be used both within [`<body>`](/document-xml-adx/adx-elements/body.md) and [`<template>`](/document-xml-adx/adx-elements/template.md).

## Examples

```xml
<template ...>
  <rect
    bottom="247mm"
    left="0"
    width="210mm"
    height="50mm"
    color="rgb(255, 10, 10)"
  />
</template>
```

```xml
<body ...>
  ...
  <rect
    width="100%"
    height="2cm"
    border="2"
    borderColor="red"
    spaceBefore="10"
    spaceAfter="20"
  />
</template>
```

## Attributes

#### `width`

The width of the rectangle. Can be in pt, mm, cm, or `%` (e.g. `width="100%"` when used in `<body>`).

#### `height`

The height of the rectangle. Can be in pt, mm, or cm.

#### `left`

Only used in `<template>` context. The distance from the left border of the document, in pt, mm, or cm.

#### `bottom`

Only used in `<template>` context. The distance from the bottom border of the document, in pt, mm, or cm.

#### `color` (optional)

The fill color of the rectangle. Can be a named color (e.g. `red`) or an RGB value (e.g. `rgb(255, 10, 10)`).

#### `border` (optional)

The width of the border in pt.

#### `borderColor` (optional)

The color of the border. Required together with `border` for the border to be drawn.

#### `class` (optional)

The style class to apply to the rectangle.

#### `spaceBefore` (optional)

Space before the rectangle in pt, mm or cm. Only applies in `<body>` context.

#### `spaceAfter` (optional)

Space after the rectangle in pt, mm or cm. Only applies in `<body>` context.

<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/rect.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.
