> ## Documentation Index
> Fetch the complete documentation index at: https://docs.errorism.co/llms.txt
> Use this file to discover all available pages before exploring further.

# TextUI

### TextUI

> วิธีการเชื่อมต่อ TextUI

<Tabs>
  <Tab title="Errorism TextUI">
    ```lua theme={null}
    M.functions = {
        textui = {
            show = function(text)
                local key, after = text:match '%${(.-)}%s*(.*)'
                local payload = {
                    key = key,
                    text = after,
                }
                exports['errorism.textui']:open(payload)
            end,
            hide = function()
                exports['errorism.textui']:close()
            end,
        },
    }
    ```
  </Tab>

  <Tab title="ERLib TextUI">
    ```lua theme={null}
    M.functions = {
        textui = {
            show = function(text)
                lib.showTextUI(text)
            end,
            hide = function()
                lib.hideTextUI()
            end,
        },
    }
    ```
  </Tab>

  <Tab title="Other">
    ```lua theme={null}
    M.functions = {
        textui = {
            show = function(text)
                exports['custom']:open(text)
            end,
            hide = function()
                exports['custom']:close()
            end,
        },
    }
    ```
  </Tab>
</Tabs>
