---
title: "screen"
---

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

# screen

The currently open screen.

| Function | What it does |
|----------|--------------|
| `screen.current()` | Open screen as `{type, title, handled}`, or `nil` when none |
| `screen.close()` | Closes a handled (container) screen the vanilla way |

`type` is a stable name for common screens — `"inventory"`, `"generic_container"`,
`"anvil"`, `"furnace"`, `"merchant"`, `"chat"`, `"game_menu"`, `"death"`, `"sign"`,
`"book"`, … — and `"other"` for anything unrecognized.

`title` is a [text component](/text). `handled` is `true` for container screens
(their slots answer to [`interaction.click_slot`](/interaction)).

```lua
local s = screen.current()
if s and s.type == "generic_container" then
print("looking at", s.title:string())
end
```

Source: https://aesthetic-docs.pages.dev/screen/index.md
