# uiPanel

> Talos next · Since next

A world-space UI panel: a game UI screen drawn into a texture and shown on a quad at this entity's transform, so it moves with the entity and is seen in every view and XR eye.

Pointer rays hit-test it and drive the screen as a mouse drives a screen UI. docs/UI.md, World-space panels.

Use it in a scene entity's `components` list as `{ "type": "uiPanel", … }`. The contract writes the fields flat and refuses unknown keys.

## Fields

| Field | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|
| `screen` | `string` | yes |  |  | The UI screen the panel shows first: a registered screen's name (a project screen under ui/screens, or one registered with ctx.ui.screen), as ctx.ui.push takes it. A name nothing answers to leaves the panel blank, with a ui.screen.unknown warning at runtime. |
| `props` | `object` | no |  |  | Props the screen is first pushed with, as ctx.ui.push(screen, props). Absent: the screen as described. |
| `size` | `Vec2` | yes |  |  | Width and height of the panel's quad, metres, before the entity's scale; both finite, above 0 and at most 100 (ui-panel-invalid). The quad lies in the entity's XY plane, centred on its origin, facing +Z. |
| `pixels` | `Vec2` | no |  |  | Width and height of the texture the screen is laid out and drawn in, pixels; whole numbers from 1 to 4096 (ui-panel-invalid). The screen lays out exactly as on a window of this size. Default: size x 1000 (one pixel per millimetre), rounded, each at least 1 and at most 4096. |
| `lit` | `boolean` | no | `false` |  | Light the panel with the scene's lights (a printed sign) instead of drawing it unlit (a display). Default false. |
| `input` | `boolean` | no | `true` |  | Whether pointer rays (the desktop mouse, an XR hand) hit the panel and drive its screen. Default true. false: rays pass through it as if it were not there. |
