---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.5
alternate:
  - https://divkit.tech/docs/en/concepts/divs/2/div-number-animator.md
  - https://divkit.tech/docs/ru/concepts/divs/2/div-number-animator.md
  - href: en/concepts/divs/2/div-number-animator.md
    type: text/markdown
    title: Markdown version
  - href: ../../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://divkit.tech/docs/en/llms.txt

# div-number-animator
Numeric value animator.

## Parameters
| Parameters | Description |
| --- | --- |
| `duration` | <p>**int**</p><p>Required parameter.</p><p>Animation duration in milliseconds.</p><p>Restriction for the value `x`: `x >= 0`.</p><p>Available platforms: Android, iOS, web.</p> |
| `end_value` | <p>**number**</p><p>Required parameter.</p><p>The value the variable will have when the animation ends.</p><p>Available platforms: Android, iOS, web.</p> |
| `id` | <p>**string**</p><p>Required parameter.</p><p>Animator ID.</p><p>Available platforms: Android, iOS, web.</p> |
| `type` | <p>**string**</p><p>Required parameter.</p><p>The value must always be `number_animator`.</p><p>Available platforms: Android, iOS, web.</p> |
| `variable_name` | <p>**string**</p><p>Required parameter.</p><p>Name of the variable being animated.</p><p>Available platforms: Android, iOS, web.</p> |
| `cancel_actions` | <p>**array**</p><p>Actions performed when the animation is canceled. For example, when a command with the 'animator_stop' type is received.</p><p>Available platforms: Android, iOS, web.</p> |
| `direction` | <p>**string**</p><p>Animation direction. Determines whether the animation should be played forward, backward, or alternate between forward and backward.</p><p>Possible values: `normal`, `reverse`, `alternate`, `alternate_reverse`.</p><p>Default value: `normal`.</p><p>Available platforms: Android, iOS, web.</p> |
| `end_actions` | <p>**array**</p><p>Actions when the animation is completed.</p><p>Available platforms: Android, iOS, web.</p> |
| `interpolator` | <p>**string**</p><p>Animated value interpolation function.</p><p>Possible values: `linear`, `ease`, `ease_in`, `ease_out`, `ease_in_out`, `spring`.</p><p>Default value: `linear`.</p><p>Available platforms: Android, iOS, web.</p> |
| `repeat_count` | <p>**object**</p><p>Number of times the animation will repeat before stopping. A value of `0` enables infinite looping.</p><p>The value has the type `div-count`.</p><p>Default value: `{"type": "fixed", "value": 1}`.</p><p>Available platforms: Android, iOS, web.</p><p>List of possible values:<li>[div-infinity-count](div-infinity-count.md#div-infinity-count)</li><li>[div-fixed-count](div-fixed-count.md#div-fixed-count)</li></p> |
| `start_delay` | <p>**int**</p><p>Delay before the animation is launched in milliseconds.</p><p>Restriction for the value `x`: `x >= 0`.</p><p>Default value: `0`.</p><p>Available platforms: Android, iOS, web.</p> |
| `start_value` | <p>**number**</p><p>The value the variable will have when the animation starts. If the property isn't specified, the current value of the variable will be used.</p><p>Available platforms: Android, iOS, web.</p> |

<details>
<summary>JSON</summary>

```json
{
  type*: "number_animator",
  cancel_actions: [
    {
      download_callbacks: {
        on_fail_actions: [ div-action, ... ],
        on_success_actions: [ div-action, ... ]
      },
      is_enabled: "bool_int",
      log_id: "string",
      log_url: "string",
      menu_items: [
        {
          action: div-action,
          actions: [ div-action, ... ],
          text*: "string"
        },
        ...
      ],
      payload: "object",
      referer: "string",
      scope_id: "string",
      target: "string",
      typed: div-action-typed,
      url: "string"
    },
    ...
  ],
  direction: "string",
  duration*: "int",
  end_actions: [
    {
      download_callbacks: {
        on_fail_actions: [ div-action, ... ],
        on_success_actions: [ div-action, ... ]
      },
      is_enabled: "bool_int",
      log_id: "string",
      log_url: "string",
      menu_items: [
        {
          action: div-action,
          actions: [ div-action, ... ],
          text*: "string"
        },
        ...
      ],
      payload: "object",
      referer: "string",
      scope_id: "string",
      target: "string",
      typed: div-action-typed,
      url: "string"
    },
    ...
  ],
  end_value*: "number",
  id*: "string",
  interpolator: "string",
  repeat_count: div-count,
  start_delay: "int",
  start_value: "number",
  variable_name*: "string"
}
```
</details>
