---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.5
alternate:
  - https://divkit.tech/docs/en/concepts/divs/2/div-action.md
  - https://divkit.tech/docs/ru/concepts/divs/2/div-action.md
  - href: en/concepts/divs/2/div-action.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-action
It defines an action when clicking on an element.

## Parameters
| Parameters | Description |
| --- | --- |
| `download_callbacks` | <p>**object**</p><p>Callbacks that are called after [data loading](../../interaction#loading-data).</p><p>The value has the type `div-download-callbacks`.</p> |
| `is_enabled` | <p>**bool_int**</p><p>The parameter disables the action. Disabled actions stop listening to their associated event (clicks, changes in visibility, and so on).</p><p>Default value: `true`.</p> |
| `log_id` | <p>**string**</p><p>Logging ID.</p> |
| `log_url` | <p>**string**</p><p>URL for logging.</p><p>The value must be a valid URL.</p> |
| `menu_items` | <p>**array**</p><p>Context menu.</p> |
| `payload` | <p>**object**</p><p>Additional parameters, passed to the host application.</p> |
| `referer` | <p>**string**</p><p>Referer URL for logging.</p><p>The value must be a valid URL.</p><p>Available platforms: Android, iOS.</p> |
| `scope_id` | <p>**string**</p><p>The ID of the element whose scope will be used for changing variable values when the action is performed.</p><p>Available platforms: Android, iOS, web.</p> |
| `target` | <p>**string**</p><p>The tab in which the URL must be opened.</p><p>Possible values: `_self`, `_blank`.</p><p>Available platforms: web.</p> |
| `typed` | <p>**object**</p><p>The value has the type `div-action-typed`.</p><p>List of possible values:<li>[div-action-animator-start](div-action-animator-start.md#div-action-animator-start)</li><li>[div-action-animator-stop](div-action-animator-stop.md#div-action-animator-stop)</li><li>[div-action-array-insert-value](div-action-array-insert-value.md#div-action-array-insert-value)</li><li>[div-action-array-remove-value](div-action-array-remove-value.md#div-action-array-remove-value)</li><li>[div-action-array-set-value](div-action-array-set-value.md#div-action-array-set-value)</li><li>[div-action-clear-focus](div-action-clear-focus.md#div-action-clear-focus)</li><li>[div-action-copy-to-clipboard](div-action-copy-to-clipboard.md#div-action-copy-to-clipboard)</li><li>[div-action-dict-set-value](div-action-dict-set-value.md#div-action-dict-set-value)</li><li>[div-action-download](div-action-download.md#div-action-download)</li><li>[div-action-focus-element](div-action-focus-element.md#div-action-focus-element)</li><li>[div-action-hide-tooltip](div-action-hide-tooltip.md#div-action-hide-tooltip)</li><li>[div-action-scroll-by](div-action-scroll-by.md#div-action-scroll-by)</li><li>[div-action-scroll-to](div-action-scroll-to.md#div-action-scroll-to)</li><li>[div-action-set-state](div-action-set-state.md#div-action-set-state)</li><li>[div-action-set-stored-value](div-action-set-stored-value.md#div-action-set-stored-value)</li><li>[div-action-set-variable](div-action-set-variable.md#div-action-set-variable)</li><li>[div-action-show-tooltip](div-action-show-tooltip.md#div-action-show-tooltip)</li><li>[div-action-submit](div-action-submit.md#div-action-submit)</li><li>[div-action-timer](div-action-timer.md#div-action-timer)</li><li>[div-action-update-structure](div-action-update-structure.md#div-action-update-structure)</li><li>[div-action-video](div-action-video.md#div-action-video)</li><li>[div-action-custom](div-action-custom.md#div-action-custom)</li><li>[div-action-set-cursor-position](div-action-set-cursor-position.md#div-action-set-cursor-position)</li></p> |
| `url` | <p>**string**</p><p>URL. Possible values: `url` or `div-action://`. To learn more, see [Interaction with elements](../../interaction).</p><p>The value must be a valid URL.</p> |

### menu_item
| Parameters | Description |
| --- | --- |
| `text` | <p>**string**</p><p>Required parameter.</p><p>Menu item title.</p> |
| `action` | <p>**object**</p><p>One action when clicking on a menu item. Not used if the `actions` parameter is set.</p><p>The value has the type `div-action`.</p> |
| `actions` | <p>**array**</p><p>Multiple actions when clicking on a menu item.</p> |

<details>
<summary>JSON</summary>

```json
{
  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"
}
```
</details>
