> For the complete documentation index, see [llms.txt](https://jiffyjrdevelopment.gitbook.io/jiffyjrdevelopmentdocs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jiffyjrdevelopment.gitbook.io/jiffyjrdevelopmentdocs/jiffy-jr-development-docs/jiffy-ui/world-text.md).

# World Text

NUI-anchored 3D labels that float above world coordinates. Each label renders a backdrop card, optional icon and key chip, an accent connector line, and a pulsing dot at the world point. Labels fade out as the player approaches the edge of `maxDist` and disappear when off-screen.

## Show a label

```lua
exports['jiffy-ui']:ShowWorldText('shop_door', {
    text    = 'Open Shop',
    icon    = 'fa-solid fa-shop',
    key     = 'E',
    coords  = vector3(100.0, 200.0, 30.0),
    maxDist = 8.0,    -- hide beyond this distance (default: 8.0)
    zOffset = 1.0,    -- height above coords (default: 1.0)
})
```

The first argument is an ID string — use it to hide or update the label later. Multiple labels can be active simultaneously using different IDs.

## Attach to a moving entity

Pass `entity` instead of (or alongside) `coords` to track a vehicle or ped. Coordinates are re-sampled every 50 ms.

```lua
exports['jiffy-ui']:ShowWorldText('vehicle_label', {
    text   = 'Personal Vehicle',
    icon   = 'fa-solid fa-car',
    entity = vehicle,  -- entity handle
})
```

## Hide a label

```lua
exports['jiffy-ui']:HideWorldText('shop_door')
```

## Update a label

Change any field on an active label without removing and re-adding it.

```lua
exports['jiffy-ui']:UpdateWorldText('shop_door', {
    text = 'Shop is closed',
    icon = 'fa-solid fa-lock',
})
```

## Clear all labels

```lua
exports['jiffy-ui']:ClearWorldText()
```

## Server relay

```lua
exports['jiffy-ui']:ShowWorldText(source, id, data)
exports['jiffy-ui']:HideWorldText(source, id)
exports['jiffy-ui']:ClearWorldText(source)
```
