---
title: "text.add: Create Text — Vector kit command — Kition"
description: "Creates point or area type at x, y with text, size, font, colour and alignment options; answers its id. Use text.setText to change existing type."
canonical: "https://developer.kition.ai/docs/kits/vector/commands/text.add"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/vector/commands/text.add](https://developer.kition.ai/docs/kits/vector/commands/text.add)

# text.add

**Create Text.** Creates point or area type at x, y with text, size, font, colour and alignment options; answers its id. Use text.setText to change existing type.

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

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `area` | `object` | no | {width, height, fit?: none\|autoHeight\|shrinkText, fitMinPercent?} |
| `charAlign` | `"romanBaseline" \| "emBoxTop" \| "emBoxCenter" \| "emBoxBottom" \| "icfTop" \| "icfBottom"` | no | default: emBoxTop and emBoxCenter while the interface is in Japanese, else romanBaseline |
| `color` | `string` | no |  |
| `font` | `string` | no |  |
| `leadingModel` | `"romanBaseline" \| "emBoxTop"` | no |  |
| `placeholder` | `boolean` | no | fill it with placeholder text instead, as the Type tools do with prefs placeholderText |
| `size` | `number` | no | points |
| `style` | `string` | no |  |
| `text` | `string` | no |  |
| `vertical` | `boolean` | no |  |
| `x` | `number` | no |  |
| `y` | `number` | no |  |

## Call through vector_run

```text
vector_run {
  "path": "<file>.kvector",
  "steps": [{ "command": "text.add" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `area`, `charAlign`, `color`, `font`, `leadingModel`, `placeholder`, `size`, `style`, `text`, `vertical`, `x`, `y`. vector_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": {
    "area": {
      "additionalProperties": true,
      "description": "{width, height, fit?: none|autoHeight|shrinkText, fitMinPercent?}",
      "properties": {
        "fit": {
          "enum": [
            "none",
            "autoHeight",
            "shrinkText"
          ],
          "type": "string"
        },
        "fitMinPercent": {},
        "height": {
          "type": "number"
        },
        "width": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "charAlign": {
      "description": "default: emBoxTop and emBoxCenter while the interface is in Japanese, else romanBaseline",
      "enum": [
        "romanBaseline",
        "emBoxTop",
        "emBoxCenter",
        "emBoxBottom",
        "icfTop",
        "icfBottom"
      ],
      "type": "string"
    },
    "color": {
      "type": "string"
    },
    "font": {
      "type": "string"
    },
    "leadingModel": {
      "enum": [
        "romanBaseline",
        "emBoxTop"
      ],
      "type": "string"
    },
    "placeholder": {
      "description": "fill it with placeholder text instead, as the Type tools do with prefs placeholderText",
      "type": "boolean"
    },
    "size": {
      "description": "points",
      "type": "number"
    },
    "style": {
      "type": "string"
    },
    "text": {
      "type": "string"
    },
    "vertical": {
      "default": false,
      "type": "boolean"
    },
    "x": {
      "type": "number"
    },
    "y": {
      "type": "number"
    }
  },
  "returns": "{id}; new area type gets Auto Size (fit autoHeight) when the autoSizeAreaType preference is on",
  "type": "object"
}
```

Generated from the command list of @kition/vector-darwin-arm64@0.1.0 and the kit itself (vector_commands through @kition/cli@0.1.1, built from KitionAI/kition-vector@7cf908f).
