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

# div-visibility-action
Actions performed when an element becomes visible.

## Parameters
| Parameters | Description |
| --- | --- |
| `log_id` | <p>**string**</p><p>Required parameter.</p><p>Logging ID.</p><p>Available platforms: Android, iOS, web.</p> |
| `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><p>Available platforms: Android, iOS, web.</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><p>Available platforms: Android, iOS, web.</p> |
| `log_limit` | <p>**int**</p><p>Limit on the number of loggings. If `0`, the limit is removed.</p><p>Restriction for the value `x`: `x >= 0`.</p><p>Default value: `1`.</p><p>Available platforms: Android, iOS, web.</p> |
| `payload` | <p>**object**</p><p>Additional parameters, passed to the host application.</p><p>Available platforms: Android, iOS, web.</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> |
| `typed` | <p>**object**</p><p>The value has the type `div-action-typed`.</p><p>Available platforms: Android, iOS, web.</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><p>Available platforms: Android, iOS, web.</p> |
| `visibility_duration` | <p>**int**</p><p>Time in milliseconds during which an element must be visible to trigger `visibility-action`.</p><p>Restriction for the value `x`: `x >= 0`.</p><p>Default value: `800`.</p><p>Available platforms: Android, iOS, web.</p> |
| `visibility_percentage` | <p>**int**</p><p>Percentage of the visible part of an element that triggers `visibility-action`.</p><p>Restriction for the value `x`: `x > 0 && x <= 100`.</p><p>Default value: `50`.</p><p>Available platforms: Android, iOS, web.</p> |

<details>
<summary>JSON</summary>

```json
{
  download_callbacks: {
    on_fail_actions: [
      {
        download_callbacks: div-download-callbacks,
        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"
      },
      ...
    ],
    on_success_actions: [
      {
        download_callbacks: div-download-callbacks,
        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"
      },
      ...
    ]
  },
  is_enabled: "bool_int",
  log_id*: "string",
  log_limit: "int",
  payload: "object",
  referer: "string",
  scope_id: "string",
  typed: div-action-typed,
  url: "string",
  visibility_duration: "int",
  visibility_percentage: "int"
}
```
</details>
