---
title: "layout.stack: Stack — Board kit command — Kition"
description: "Places the elements one after another in a row or column with a fixed gap (24 by default)."
canonical: "https://developer.kition.ai/docs/kits/board/commands/layout.stack"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/board/commands/layout.stack](https://developer.kition.ai/docs/kits/board/commands/layout.stack)

# layout.stack

**Stack.** Places the elements one after another in a row or column with a fixed gap (24 by default).

- Kit: Board 0.1.0 (.kboard); reference: [Board kit commands](https://developer.kition.ai/docs/kits/board.md)
- Changes the document: yes
- Acts on: `ids` (a list of ids), which a run step’s `on` fills

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `axis` | `"horizontal" \| "vertical"` | yes | Direction |
| `gap` | `number (≥ 0, ≤ 10000)` | no | Space between (24 by default) |
| `ids` | `string[]` | yes | The elements |

## Call through board_run

```text
board_run {
  "path": "<file>.kboard",
  "steps": [{ "command": "layout.stack", "params": { "axis": <"horizontal" | "vertical">, "ids": <string[]> } }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `gap`. board_run answers the step’s result in `completed[i].result`.

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "axis": {
      "description": "Direction",
      "enum": [
        "horizontal",
        "vertical"
      ],
      "type": "string"
    },
    "gap": {
      "description": "Space between (24 by default)",
      "maximum": 10000,
      "minimum": 0,
      "type": "number"
    },
    "ids": {
      "description": "The elements",
      "items": {
        "type": "string"
      },
      "type": "array",
      "x-khp-types": [
        "Element"
      ]
    }
  },
  "required": [
    "axis",
    "ids"
  ],
  "type": "object"
}
```

Generated from the command list of @kition/board-darwin-arm64@0.1.0 and the kit itself (board_commands through @kition/cli@0.1.1, built from KitionAI/kition-board@e78c190).
