> For the complete documentation index, see [llms.txt](https://docs.kojascripts.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kojascripts.eu/new/hud/guides/text-ui.md).

# Text UI

**Function `TextUI(data)`**

Displays the text-based UI.

**Parameters:**

* **`data.input`** (string): The activation key (e.g., "E").
* **`data.type`** (string): The type of interaction (e.g., "press" or "hold").
* **`data.desc`** (string): The description displayed in the UI.

***

**Function `HideUI()`**

Hides the text-based UI.

***

**Exports**

The module exports two functions that can be used in other scripts:

* `exports["script_name"]:TextUI(data)`
* `exports["script_name"]:HideUI()`

***

**Example Usage**

```lua
exports["KOJA_HUD"]:TextUI({
    input = "E",
    type = "press",
    desc = "Open door"
})
```

```lua
exports["script_name"]:HideUI()
```
