---
title: "templateProps.addProperty: Add Property to Graphics Templates — Motion kit command — Kition"
description: "Add Property to Graphics Templates: `{layer, path|prop}` or the selected properties."
canonical: "https://developer.kition.ai/docs/kits/motion/commands/templateProps.addProperty"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/motion/commands/templateProps.addProperty](https://developer.kition.ai/docs/kits/motion/commands/templateProps.addProperty)

# templateProps.addProperty

**Add Property to Graphics Templates.** Add Property to Graphics Templates: `{layer, path|prop}` or the selected properties.

- Kit: Motion 0.1.0 (.kmotion); reference: [Motion kit commands](https://developer.kition.ai/docs/kits/motion.md)
- Changes the document: yes
- Acts on: `layer` (one id), which a run step’s `on` fills

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `as` | `string` | no | font (Source Text font family/style/size) \| scale (uniform Scale); Source Text font family/style/size; uniform Scale |
| `comp` | `integer \| string` | no |  |
| `control` | `integer` | no | read by the command beside its listed parameters |
| `group` | `integer` | no | control id |
| `index` | `integer` | no | a position counted from 0 (the first is 0) |
| `layer` | `integer \| string` | no |  |
| `mirror` | `boolean` | no | a property already present is added as a mirror; default true |
| `name` | `string` | no |  |
| `path` | `string` | no | uid (default: the selected properties); default: the selected properties; one of several alternative parameters |
| `prop` | `integer` | no | uid (default: the selected properties); default: the selected properties; one of several alternative parameters |
| `text` | `string` | no | read by the command beside its listed parameters |

## Call through motion_run

```text
motion_run {
  "path": "<file>.kmotion",
  "steps": [{ "command": "templateProps.addProperty" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `as`, `comp`, `control`, `group`, `index`, `layer`, `mirror`, `name`, `path`, `prop`, `text`. motion_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": {
    "as": {
      "description": "font (Source Text font family/style/size) | scale (uniform Scale); Source Text font family/style/size; uniform Scale",
      "type": "string"
    },
    "comp": {
      "oneOf": [
        {
          "description": "item id",
          "type": "integer"
        },
        {
          "description": "comp name",
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Item"
      ]
    },
    "control": {
      "description": "read by the command beside its listed parameters",
      "type": "integer"
    },
    "group": {
      "description": "control id",
      "type": "integer"
    },
    "index": {
      "description": "a position counted from 0 (the first is 0)",
      "type": "integer"
    },
    "layer": {
      "oneOf": [
        {
          "description": "layer id as motion_inspect lists it (when no layer has that id, its 1-based stack position)",
          "type": "integer"
        },
        {
          "description": "layer id as receipts print it (\"51\"), a layer name, or #n for the n-th from the top",
          "type": "string"
        }
      ],
      "x-khp-index": "#",
      "x-khp-index-numbers": true,
      "x-khp-name": "name",
      "x-khp-types": [
        "Layer"
      ]
    },
    "mirror": {
      "description": "a property already present is added as a mirror; default true",
      "type": "boolean"
    },
    "name": {
      "type": "string"
    },
    "path": {
      "description": "uid (default: the selected properties); default: the selected properties; one of several alternative parameters",
      "type": "string"
    },
    "prop": {
      "description": "uid (default: the selected properties); default: the selected properties; one of several alternative parameters",
      "type": "integer"
    },
    "text": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/motion-darwin-arm64@0.1.0 and the kit itself (motion_commands through @kition/cli@0.1.1, built from KitionAI/kition-motion@4719aa7).
