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

# FAQ


{% note info %}

If you are looking for an answer to a specific question, use the keyboard shortcut **Ctrl + F** (or **Cmd + F** for macOS) to search the page.

{% endnote %}


## General questions about DivKit


{% cut "What is DivKit?" %}

DivKit is a cross-platform library based on the Server-Driven UI approach. It lets you build user interfaces for apps and sites using a layout description in JSON format.

{% endcut %}

{% cut "What is Server-Driven UI?" %}

It's an architectural pattern where the page or app layout is generated on the server side. The layout description is then sent to the client, which renders the UI automatically based on this description.

With this approach, you can:

- Change your app's appearance and add new visual elements without releasing a new app version.
- Use the same page layout across different platforms.


{% endcut %}

{% cut "Which platforms does DivKit support?" %}

On the client side, DivKit supports iOS, Android, and Web platforms.

{% endcut %}

{% cut "Can I publish apps with Server-Driven UI in the App Store and Google Play? " %}

Neither the App Store nor Google Play prohibit updating the user interface of your app based on data received from the server, as long as these changes don't alter the app's original purpose.

{% endcut %}

{% cut "Can I use DivKit in commercial apps? " %}

Yes. DivKit is an open-source library released under the [Apache License, Version 2.0](https://github.com/divkit/divkit/blob/main/LICENSE).

{% endcut %}

{% cut "How fast is DivKit?" %}

In our experience, loading an average heavy web page takes less than 16 ms. DivKit supports multithreading and can reuse previously rendered elements. This speeds up calculations for text elements (such as large blocks of text or tables) and makes the interface faster overall.

{% endcut %}


## Questions about using DivKit in development


{% cut "Where is data taken from for the cards?" %}


Card descriptions in JSON format can be stored on the server or locally on the device.

To generate JSON descriptions of card layouts, you can use the [json-builder](https://github.com/divkit/divkit/tree/main/json-builder) library, which is available for Kotlin, TypeScript, and Python.



{% endcut %}

{% cut "What should a card layout look like?" %}


The card layout must be described in JSON format using a specific schema.

<!--<p>JSON, который можно будет запустить в одном из демо-приложений с тестовыми данными.</p>-->

{% endcut %}

{% cut "How do I quickly test my layout?" %}

To prepare a JSON layout description and preview the card in web format, use [DivKit Web Playground](https://divkit.tech/playground). You can then transfer your JSON file to the DivKit Playground app for [Android](https://divkit.tech/docs/en/concepts/quick-start-android.md) or [iOS](https://divkit.tech/docs/en/concepts/quick-start-ios.md) and see what the layout looks like on a mobile device.

{% endcut %}

{% cut "How do I implement interactive elements (transitions, actions, taps)?" %}


DivKit supports [actions](https://divkit.tech/docs/en/concepts/interaction.md) triggered by a tap on an element. With actions, you can change [element states](https://divkit.tech/docs/en/concepts/interaction.md), [load additional data](https://divkit.tech/docs/en/concepts/interaction.md), or call event handlers implemented at the host app level.

In addition, DivKit supports [variables and triggers](https://divkit.tech/docs/en/concepts/variables.md#actions). A trigger is set off by changes in the variable's value, prompting one or multiple actions to occur.


{% endcut %}

{% cut "Can I change the layout based on dynamic data? " %}

Yes. For example, you can achieve this using [variables](https://divkit.tech/docs/en/concepts/variables.md). If the value of a property is set through a variable, its representation updates when that variable changes.

{% endcut %}

{% cut "How is logic handled (for example, for actions triggered by changes in field values)? " %}

Logic can be handled using [variables](https://divkit.tech/docs/en/concepts/variables.md), [calculated expressions](https://divkit.tech/docs/en/concepts/expressions.md), and [triggers](https://divkit.tech/docs/en/concepts/divs/2/div-trigger.md). In addition, DivKit provides a set of [functions](https://divkit.tech/docs/en/concepts/functions.md) for working with strings, dates, and numbers.
For example, if a user enters text in a field, you can pass this value to a variable. This change in the variable's value will set off the trigger and prompt the associated action.


{% endcut %}

{% cut "Are animations supported?" %}

Yes, DivKit supports several types of [animation](https://divkit.tech/docs/en/concepts/animation.md), including transitions on state changes, button taps, as well as appearance and disappearance of elements.

{% endcut %}

{% cut "Can I use DivKit to create layouts for individual app screens?" %}

Yes, you can. For example, in Yandex apps, DivKit cards are often integrated into one or multiple screens.

{% endcut %}

{% cut "Can I implement an input form?" %}

Yes. To do this, use the [div-input](https://divkit.tech/docs/en/concepts/divs/2/div-input.md) element, which is specifically designed for text input.

{% endcut %}

{% cut "Is there accessibility support?" %}

Yes, DivKit has [elements](https://divkit.tech/docs/en/concepts/divs/2/div-accessibility.md) that ensure accessibility for people with disabilities.

{% endcut %}

{% cut "Is there localization support? " %}

The service doesn't offer any dedicated localization features. To localize interface elements, create separate JSON layout files for each language.

{% endcut %}

{% cut "How does the backend work?" %}

We don't have an out-of-the-box solution for server deployment. However, DivKit provides libraries for generating JSON layout files that you can then integrate into your server.

{% endcut %}

{% cut "How do I implement light and dark themes? " %}

Use [variables](https://divkit.tech/docs/en/concepts/variables.md). For example, for each element, you can retrieve a palette consisting of two colors from the server. On the client side, define the variables that should determine which colors to use for specific elements.

{% endcut %}

{% cut "How do I log cards properly?" %}

For proper logging, the `log_id` parameter must be unique. For example, when logging cards in a carousel, each card must have its own `log_id`, otherwise only the first card will be logged, and all the others will be considered duplicates.

{% endcut %}

{% cut "How do I disable action animation?" %}

In the [animation](https://divkit.tech/docs/en/concepts/divs/2/div-animation.md) element, specify: `"name": "no_animation"`.

{% endcut %}

{% cut "How do I create a card with Lottie animation?" %}

To add a Lottie animation, specify the `extensions` array in the [image](https://divkit.tech/docs/en/concepts/divs/2/div-image.md) element. For more information, see [Customization](https://divkit.tech/docs/en/concepts/extensions.md).

{% endcut %}

{% cut "How do I create an empty block?" %}

If you need a block that will just take up space, use the [separator](https://divkit.tech/docs/en/concepts/divs/2/div-separator.md) element and set its `color` parameter to transparent.

{% endcut %}

{% cut "How do I create containers with a single element?" %}

It isn't worth it, it will affect performance. Try not to create unnecessary wrappers.

{% endcut %}


<!-- 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 -->

