---
title: "appearance.addEffect: Add Effect — Vector kit command — Kition"
description: "Applies a live effect with its parameters to the targets or one of their appearance items (the same as effect.apply)."
canonical: "https://developer.kition.ai/docs/kits/vector/commands/appearance.addEffect"
---

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

# appearance.addEffect

**Add Effect.** Applies a live effect with its parameters to the targets or one of their appearance items (the same as effect.apply).

- Kit: Vector 0.1.0 (.kvector); reference: [Vector kit commands](https://developer.kition.ai/docs/kits/vector.md)
- Changes the document: yes
- Acts on: `ids` (a list of ids), which a run step’s `on` fills

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `contents` | `any` | no | contents: the objects inside groups and layers; one of several alternative parameters |
| `effect` | `string` | no | the effect's catalogue id (`stylize.dropShadow`) |
| `id` | `integer \| string` | no | an object ID, or the effect's catalogue name |
| `ids` | `integer[]` | no | object IDs |
| `item` | `any` | no | appearance item index\|null (apply to that fill/stroke only; omitted: the Appearance panel's active item, else the whole object); apply to that fill/stroke only; omitted: the Appearance panel's active item, else the whole object |
| `params` | `object` | no | missing keys take the dialog defaults |
| `target` | `string` | no | like object; one of several alternative parameters |

## Call through vector_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: `contents`, `effect`, `id`, `ids`, `item`, `params`, `target`. 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": {
    "contents": {
      "description": "contents: the objects inside groups and layers; one of several alternative parameters"
    },
    "effect": {
      "description": "the effect's catalogue id (`stylize.dropShadow`)",
      "type": "string"
    },
    "id": {
      "description": "an object ID, or the effect's catalogue name",
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ],
      "x-khp-types": [
        "Node"
      ]
    },
    "ids": {
      "description": "object IDs",
      "items": {
        "type": "integer"
      },
      "type": "array",
      "x-khp-types": [
        "Node"
      ]
    },
    "item": {
      "description": "appearance item index|null (apply to that fill/stroke only; omitted: the Appearance panel's active item, else the whole object); apply to that fill/stroke only; omitted: the Appearance panel's active item, else the whole object"
    },
    "params": {
      "additionalProperties": true,
      "description": "missing keys take the dialog defaults",
      "type": "object"
    },
    "target": {
      "description": "like object; one of several alternative parameters",
      "type": "string"
    }
  },
  "returns": "{ids, index, item}",
  "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).
