---
title: "style.cell.add: New Cell Style — Layout kit command — Kition"
description: "Creates a table cell style with fill, tint, insets and paragraph style, or from the target cell."
canonical: "https://developer.kition.ai/docs/kits/layout/commands/style.cell.add"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/layout/commands/style.cell.add](https://developer.kition.ai/docs/kits/layout/commands/style.cell.add)

# style.cell.add

**New Cell Style.** Creates a table cell style with fill, tint, insets and paragraph style, or from the target cell.

- 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 |
| --- | --- | --- | --- |
| `basedOn` | `string` | no | read by the command beside its listed parameters |
| `col` | `integer` | no | read by the command beside its listed parameters |
| `cols` | `integer[]` | no | inclusive zero-based index range |
| `fill` | `string` | no |  |
| `fromSelection` | `boolean` | no | the target cell's look |
| `insets` | `number \| number[]` | no |  |
| `name` | `string` | no |  |
| `paragraphStyle` | `string` | 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?} |
| `table` | `integer` | no | read by the command beside its listed parameters |
| `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": "style.cell.add" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `basedOn`, `col`, `cols`, `fill`, `fromSelection`, `insets`, `name`, `paragraphStyle`, `row`, `rows`, `story`, `stroke`, `table`, `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": {
    "basedOn": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    },
    "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"
      ]
    },
    "fromSelection": {
      "description": "the target cell's look",
      "type": "boolean"
    },
    "insets": {
      "oneOf": [
        {
          "description": "points on every side",
          "type": "number"
        },
        {
          "description": "[top, left, bottom, right] points",
          "items": {
            "type": "number"
          },
          "type": "array"
        }
      ]
    },
    "name": {
      "type": "string"
    },
    "paragraphStyle": {
      "type": "string",
      "x-khp-name": "paragraphName",
      "x-khp-types": [
        "Style"
      ]
    },
    "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?}",
      "properties": {
        "color": {
          "type": "string",
          "x-khp-name": "name",
          "x-khp-role": "object",
          "x-khp-types": [
            "Swatch"
          ]
        },
        "tint": {},
        "weight": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "table": {
      "description": "read by the command beside its listed parameters",
      "type": "integer"
    },
    "tint": {
      "description": "percent from 0 to 100",
      "type": "number"
    },
    "vj": {
      "enum": [
        "top",
        "center",
        "bottom",
        "justify"
      ],
      "type": "string"
    }
  },
  "returns": "{name}",
  "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).
