---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.3
alternate:
  - https://divkit.tech/docs/en/concepts/divs/2/div-trigger.md
  - https://divkit.tech/docs/ru/concepts/divs/2/div-trigger.md
---
> **Documentation Index:** Fetch the complete configuration index at https://divkit.tech/docs/en/llms.txt

# div-trigger
A trigger that causes an action when activated.

## Parameters
| Parameters | Description |
| --- | --- |
| `actions` | <p>**array**</p><p>Required parameter.</p><p>Action when a trigger is activated.</p><p>An array must not be empty.</p> |
| `condition` | <p>**bool_int**</p><p>Required parameter.</p><p>Condition for activating a trigger. For example, `liked && subscribed`.</p> |
| `mode` | <p>**string**</p><p>Trigger activation mode:<li>`on_condition` — a trigger is activated when the condition changes from `false` to `true`;</li><li>`on_variable` — a trigger is activated when the condition is met and the variable value changes.</li></p><p>Possible values: `on_condition`, `on_variable`.</p><p>Default value: `on_condition`.</p> |

<details>
<summary>JSON</summary>

```json
{
  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"
    },
    ...
  ],
  condition*: "bool_int",
  mode: "string"
}
```
</details>
