---
title: "table.options: Table Options — Layout kit command — Kition"
description: "Sets table options: direction, border, spacing before and after, header and footer rows and repeats, alternating fills."
canonical: "https://developer.kition.ai/docs/kits/layout/commands/table.options"
---

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

# table.options

**Table Options.** Sets table options: direction, border, spacing before and after, header and footer rows and repeats, alternating fills.

- Kit: Layout 0.1.0 (.klayout); reference: [Layout kit commands](https://developer.kition.ai/docs/kits/layout.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `altCols` | `object \| null` | no |  |
| `altRows` | `object \| null` | no |  |
| `border` | `object` | no | {weight?, color?, tint?, type?} |
| `col` | `integer` | no | read by the command beside its listed parameters |
| `cols` | `integer[]` | no | inclusive zero-based index range |
| `direction` | `"leftToRight" \| "rightToLeft"` | no |  |
| `footerRows` | `integer` | no |  |
| `headerRows` | `integer` | no |  |
| `repeatFooter` | `boolean` | no |  |
| `repeatHeader` | `boolean` | no |  |
| `row` | `integer` | no | read by the command beside its listed parameters |
| `rows` | `integer[]` | no | inclusive zero-based index range |
| `spaceAfter` | `number` | no |  |
| `spaceBefore` | `number` | no |  |
| `story` | `integer` | no | read by the command beside its listed parameters |
| `table` | `integer` | no | read by the command beside its listed parameters |

## Call through layout_run

```text
layout_run {
  "path": "<file>.klayout",
  "steps": [{ "command": "table.options" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `altCols`, `altRows`, `border`, `col`, `cols`, `direction`, `footerRows`, `headerRows`, `repeatFooter`, `repeatHeader`, `row`, `rows`, `spaceAfter`, `spaceBefore`, `story`, `table`. layout_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": {
    "altCols": {
      "additionalProperties": true,
      "oneOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "properties": {
        "firstColor": {
          "type": "string",
          "x-khp-name": "name",
          "x-khp-role": "object",
          "x-khp-types": [
            "Swatch"
          ]
        },
        "nextColor": {
          "type": "string",
          "x-khp-name": "name",
          "x-khp-role": "object",
          "x-khp-types": [
            "Swatch"
          ]
        }
      },
      "type": "object"
    },
    "altRows": {
      "additionalProperties": true,
      "oneOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "properties": {
        "firstColor": {
          "type": "string",
          "x-khp-name": "name",
          "x-khp-role": "object",
          "x-khp-types": [
            "Swatch"
          ]
        },
        "nextColor": {
          "type": "string",
          "x-khp-name": "name",
          "x-khp-role": "object",
          "x-khp-types": [
            "Swatch"
          ]
        }
      },
      "type": "object"
    },
    "border": {
      "additionalProperties": true,
      "description": "{weight?, color?, tint?, type?}",
      "properties": {
        "color": {
          "type": "string",
          "x-khp-name": "name",
          "x-khp-role": "object",
          "x-khp-types": [
            "Swatch"
          ]
        },
        "tint": {},
        "type": {},
        "weight": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "col": {
      "description": "read by the command beside its listed parameters",
      "type": "integer"
    },
    "cols": {
      "description": "inclusive zero-based index range",
      "items": {
        "type": "integer"
      },
      "maxItems": 2,
      "minItems": 1,
      "type": "array"
    },
    "direction": {
      "enum": [
        "leftToRight",
        "rightToLeft"
      ],
      "type": "string"
    },
    "footerRows": {
      "type": "integer"
    },
    "headerRows": {
      "type": "integer"
    },
    "repeatFooter": {
      "type": "boolean"
    },
    "repeatHeader": {
      "type": "boolean"
    },
    "row": {
      "description": "read by the command beside its listed parameters",
      "type": "integer"
    },
    "rows": {
      "description": "inclusive zero-based index range",
      "items": {
        "type": "integer"
      },
      "maxItems": 2,
      "minItems": 1,
      "type": "array"
    },
    "spaceAfter": {
      "type": "number"
    },
    "spaceBefore": {
      "type": "number"
    },
    "story": {
      "description": "read by the command beside its listed parameters",
      "type": "integer",
      "x-khp-types": [
        "Story"
      ]
    },
    "table": {
      "description": "read by the command beside its listed parameters",
      "type": "integer"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/layout-darwin-arm64@0.1.0 and the kit itself (layout_commands through @kition/cli@0.1.1, built from KitionAI/kition-layout@8767a18).
