---
metadata:
  - name: generator
    content: Diplodoc Platform v5.70.0
alternate:
  - https://divkit.tech/docs/en/concepts/visibility-actions.md
  - https://divkit.tech/docs/ru/concepts/visibility-actions.md
  - href: https://divkit.tech/docs/en/concepts/visibility-actions.md
    type: text/markdown
    title: Markdown version
  - href: https://divkit.tech/docs/en/llms.txt?revision=r22102947
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://divkit.tech/docs/en/llms.txt?revision=r22102947

# Visibility actions

An element can perform actions without user input: when it appears on the screen and when it disappears from it. Such actions are set in the `visibility_actions` and `disappear_actions` properties. In addition to their own parameters, they support the main parameters of [regular actions](https://divkit.tech/docs/en/concepts/interaction.md): `url`, `typed`, `log_id`, `is_enabled`, `payload`, `scope_id`, `referer`, and `download_callbacks`.

## Actions when appearing {#visibility}

[visibility](https://divkit.tech/docs/en/concepts/divs/2/div-visibility-action.md) elements are triggered when an element is shown on the screen.

```json translate=no
{
  "visibility_actions": [
    {
      "log_id":"content_01_visibility",
      "visibility_percentage": 100,
      "visibility_duration": 1000,
      "url": "div-action://none"
    }
  ]
}
```

#|
||
**Parameter**
|
**Description**
||

||
`visibility_percentage`
|
Percentage of the element's visible area.
||

||
`visibility_duration`
|
The minimum time of its visibility.
||
||
`log_id`
|
Optional logging ID for the visibility action.
||
|#

By default, `visibility_percentage` is `50` and `visibility_duration` is `800` ms. The `log_limit` parameter limits how many times the action is triggered and logged: the default value is `1`, so the action runs once. The value `0` removes the limit.

{% note info %}

Older versions of DivKit clients ignore visibility actions without `log_id`. If such clients also receive the card, specify `log_id`.

{% endnote %}

## Actions when disappearing {#disappear}

[Disappear](https://divkit.tech/docs/en/concepts/divs/2/div-disappear-action.md) elements are triggered when the element is no longer visible.

```json translate=no
{
  "disappear_actions": [
    {
      "log_id": "content_01_disappear",
      "visibility_percentage": 0,
      "disappear_duration": 800,
      "url": "div-action://none"
    }
  ]
}
```

#|
|| **Parameter** | **Description** ||
|| `visibility_percentage` | Percentage of the visible part of the element that triggers the action. The default value is `0`. ||
|| `disappear_duration` | Time in milliseconds during which the element must be outside the visible area to trigger the action. The default value is `800`. ||
|| `log_id` | ID for logging the action. ||
|| `log_limit` | Limit on how many times the action is triggered and logged. The default value is `1`, and `0` removes the limit. ||
|#

<!-- source: en/_includes/index/troubleshooting.md -->
## Learn more {#troubleshooting}

You can discuss topics of interest in the DivKit user community in Telegram: [https://t.me/divkit_community_en](https://t.me/divkit_community_en).



[DivKit Repository](https://github.com/divkit/divkit)
<!-- endsource: en/_includes/index/troubleshooting.md -->
