---
title: "animation.add: Add Animation — Slide kit command — Kition"
description: "Adds an animation effect to shapes in `ids` or the selection, after their existing ones, with start, duration and delay; a `customPath` motion path goes through `points` ([[dx, dy]] in points from the shape's place)."
canonical: "https://developer.kition.ai/docs/kits/slide/commands/animation.add"
---

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

# animation.add

**Add Animation.** Adds an animation effect to shapes in `ids` or the selection, after their existing ones, with start, duration and delay; a `customPath` motion path goes through `points` ([[dx, dy]] in points from the shape's place).

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

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `class` | `"entrance" \| "emphasis" \| "exit" \| "path"` | no | animation class |
| `closed` | `boolean` | no |  |
| `delay` | `number (≥ 0, ≤ 600000)` | no | milliseconds |
| `duration` | `number (≥ 0, ≤ 600000)` | no | milliseconds |
| `effect` | `string` | no | an effect id from animation.list |
| `ids` | `(integer \| string)[]` | no |  |
| `onSlide` | `integer` | no | the slide the ids are on, from 1 |
| `option` | `string` | no | an effect option from animation.list |
| `points` | `number[][]` | no | customPath: where the path goes, in points from the shape's place |
| `smooth` | `boolean` | no |  |
| `start` | `"onClick" \| "withPrevious" \| "afterPrevious"` | no |  |

## Call through slide_run

```text
slide_run {
  "path": "<file>.pptx",
  "steps": [{ "command": "animation.add" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `class`, `closed`, `delay`, `duration`, `effect`, `ids`, `onSlide`, `option`, `points`, `smooth`, `start`. slide_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": {
    "class": {
      "description": "animation class",
      "enum": [
        "entrance",
        "emphasis",
        "exit",
        "path"
      ],
      "type": "string"
    },
    "closed": {
      "type": "boolean"
    },
    "delay": {
      "description": "milliseconds",
      "maximum": 600000,
      "minimum": 0,
      "type": "number"
    },
    "duration": {
      "description": "milliseconds",
      "maximum": 600000,
      "minimum": 0,
      "type": "number"
    },
    "effect": {
      "description": "an effect id from animation.list",
      "type": "string"
    },
    "ids": {
      "items": {
        "description": "an id",
        "oneOf": [
          {
            "type": "integer"
          },
          {
            "type": "string"
          }
        ]
      },
      "type": "array",
      "x-khp-types": [
        "Shape"
      ]
    },
    "onSlide": {
      "description": "the slide the ids are on, from 1",
      "type": "integer"
    },
    "option": {
      "description": "an effect option from animation.list",
      "type": "string"
    },
    "points": {
      "description": "customPath: where the path goes, in points from the shape's place",
      "items": {
        "description": "[dx, dy]",
        "items": {
          "type": "number"
        },
        "type": "array"
      },
      "type": "array"
    },
    "smooth": {
      "type": "boolean"
    },
    "start": {
      "enum": [
        "onClick",
        "withPrevious",
        "afterPrevious"
      ],
      "type": "string"
    }
  },
  "type": "object",
  "x-khp-position": "independent"
}
```

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