---
title: "table.setCell: Cell Options — Layout kit command — Kition"
description: "Sets the target cells' fill, tint, insets, vertical justification and text."
canonical: "https://developer.kition.ai/docs/kits/layout/commands/table.setCell"
---

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

# table.setCell

**Cell Options.** Sets the target cells' fill, tint, insets, vertical justification and text.

- 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 |
| --- | --- | --- | --- |
| `col` | `integer` | no | read by the command beside its listed parameters |
| `cols` | `integer[]` | no | inclusive zero-based index range |
| `fill` | `string` | no |  |
| `insets` | `number \| number[]` | no |  |
| `row` | `integer` | no | read by the command beside its listed parameters |
| `rows` | `integer[]` | no | inclusive zero-based index range |
| `story` | `integer` | no | read by the command beside its listed parameters |
| `stroke` | `object` | no | {weight?, color?, tint?, type?: solid\|dashed\|dotted, edges?: all\|outer\|inner\|top\|left\|bottom\|right} |
| `table` | `integer` | no | read by the command beside its listed parameters |
| `text` | `string` | no |  |
| `tint` | `number` | no | percent from 0 to 100 |
| `vj` | `"top" \| "center" \| "bottom" \| "justify"` | no |  |

## Call through layout_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: `col`, `cols`, `fill`, `insets`, `row`, `rows`, `story`, `stroke`, `table`, `text`, `tint`, `vj`. 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": {
    "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"
    },
    "fill": {
      "type": "string",
      "x-khp-name": "name",
      "x-khp-types": [
        "Swatch"
      ]
    },
    "insets": {
      "oneOf": [
        {
          "description": "points on every side",
          "type": "number"
        },
        {
          "description": "[top, left, bottom, right] points",
          "items": {
            "type": "number"
          },
          "type": "array"
        }
      ]
    },
    "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"
    },
    "story": {
      "description": "read by the command beside its listed parameters",
      "type": "integer",
      "x-khp-types": [
        "Story"
      ]
    },
    "stroke": {
      "additionalProperties": true,
      "description": "{weight?, color?, tint?, type?: solid|dashed|dotted, edges?: all|outer|inner|top|left|bottom|right}",
      "properties": {
        "color": {
          "type": "string",
          "x-khp-name": "name",
          "x-khp-role": "object",
          "x-khp-types": [
            "Swatch"
          ]
        },
        "edges": {
          "enum": [
            "all",
            "outer",
            "inner",
            "top",
            "left",
            "bottom",
            "right"
          ],
          "type": "string"
        },
        "tint": {},
        "type": {
          "enum": [
            "solid",
            "dashed",
            "dotted"
          ],
          "type": "string"
        },
        "weight": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "table": {
      "description": "read by the command beside its listed parameters",
      "type": "integer"
    },
    "text": {
      "type": "string"
    },
    "tint": {
      "description": "percent from 0 to 100",
      "type": "number"
    },
    "vj": {
      "enum": [
        "top",
        "center",
        "bottom",
        "justify"
      ],
      "type": "string"
    }
  },
  "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).
