---
title: "BOX"
manual: "TypoScript Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3tsref:gifbuilder-box@main"
source: "Gifbuilder/ObjectNames/Box/Index.rst"
rendered: "2026-09-19T06:55:14+00:00"
---

# BOX {#gifbuilder-box}

Prints a filled box.

## Example {#gifbuilder-box-example}

**EXT:my_extension/Configuration/Sets/Main/setup.typoscript**

```typoscript
lib.example = IMAGE
lib.example {
  file = GIFBUILDER
  file {
    # Rectangle with 100 pixel width and 50 pixel height
    # in orange with opacity 50%
    10 = BOX
    10 {
      dimensions = 0, 0, 100, 50
      color = #ff8700
      opacity = 50
    }
  }
}

```

## Properties {#gifbuilder-box-properties}

-   [align](https://docs.typo3.org/permalink/t3tsref:align@main)
-   [color](https://docs.typo3.org/permalink/t3tsref:color@main)
-   [dimensions](https://docs.typo3.org/permalink/t3tsref:dimensions@main)
-   [opacity](https://docs.typo3.org/permalink/t3tsref:opacity@main)

### align {#gifbuilder-box-align}

-   **align**

    -   *Type:* VHalign / [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)
    -   *Default:* l, t

    Pair of values, which defines the horizontal and vertical alignment of
    the box in the image.

    **Values:**

    Horizontal alignment:

    -   **l**

        left

    -   **c**

        center

    -   **r**

        right

    Vertical alignment:

    -   **t**

        top

    -   **c**

        center

    -   **b**

        bottom

    **Example:**

    Horizontally centered, vertically at the bottom:

    **EXT:site_package/Configuration/Sets/Main/setup.typoscript**

    ```typoscript
    align = c, b
    ```

### color {#gifbuilder-box-color}

-   **color**

    -   *Type:* [Colors in TypoScript GIFBUILDER](https://docs.typo3.org/permalink/t3tsref:data-type-graphiccolor@main) / [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)
    -   *Default:* black

    Fill color of the box.

### dimensions {#gifbuilder-box-dimensions}

-   **dimensions**

    -   *Type:* x,y,w,h [+calc](https://docs.typo3.org/permalink/t3tsref:gifbuilder-calc@main) / [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)

    Dimensions of a filled box.

    x,y is the offset.

    w,h are the dimensions. Dimensions of 1 will result in 1-pixel wide
    lines!

### opacity {#gifbuilder-box-opacity}

-   **opacity**

    -   *Type:* positive integer (1-100) / [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)
    -   *Default:* 100

    The degree to which the box conceals the background.

    Mathematically speaking: Opacity = Transparency^-1, i.e. 100% opacity = 0%
    transparency.
