# BoxBuilder

**Kind**: interface | **Module**: [Workspaces](https://docs.interop.io/desktop/reference/javascript/workspaces/index.md)

**Source**: https://docs.interop.io/desktop/reference/javascript/workspaces/boxbuilder/index.html

An object describing a builder used to create workspace boxes

## Methods

### addColumn

Adds a new column to the calling box. Returns the new column.

```ts
(definition?: BoxDefinition) => BoxBuilder
```

**Parameters**

- **`definition`** (`BoxDefinition`, optional)

**Returns**: `BoxBuilder`

### addGroup

Adds a new group to the calling box. Returns the new group.

```ts
(definition?: BoxDefinition) => BoxBuilder
```

**Parameters**

- **`definition`** (`BoxDefinition`, optional)

**Returns**: `BoxBuilder`

### addRow

Adds a new row to the calling box. Returns the new row.

```ts
(definition?: BoxDefinition) => BoxBuilder
```

**Parameters**

- **`definition`** (`BoxDefinition`, optional)

**Returns**: `BoxBuilder`

### addWindow

Adds a new window to the calling box. Returns the immediate parent box of the window.

```ts
(definition: WorkspaceWindowDefinition) => BoxBuilder
```

**Parameters**

- **`definition`** (`WorkspaceWindowDefinition`, required)

**Returns**: `BoxBuilder`

### serialize

Returns the JSON object which describes the full structure of the box.

```ts
() => BoxDefinition
```

**Returns**: `BoxDefinition`

## Related types

- [BoxDefinition](https://docs.interop.io/desktop/reference/javascript/workspaces/boxdefinition/index.md)
- [WorkspaceWindowDefinition](https://docs.interop.io/desktop/reference/javascript/workspaces/workspacewindowdefinition/index.md)
