# Root Container

Every KVision application must have at least one Root container ( an instance of `io.kvision.panel.Root` class). Root container is initialized by an extension function of the Application class, with an ID attribute of HTML tag, which must be present in the main `index.html` file.

{% code title="App.kt" %}

```kotlin
import io.kvision.panel.root

override fun start() {
    root("kvapp") {
    }
}
```

{% endcode %}

{% code title="index.html" %}

```markup
<!DOCTYPE html>
<html>
...
<body>
<div id="kvapp"></div>
</body>
</html>
```

{% endcode %}

The Root container is the root of the components tree, which is inserted into the DOM in the place of the selected HTML element. This tree is managed, rendered and refreshed by the Root container.

It is possible to have more than one Root container in one application. In such case there will be more than one independent components trees.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kvision.gitbook.io/kvision-guide/2.-frontend-development-guide/root-container.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
