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

# ITEM

> The current iteration item inside a ForEach loop.

`ITEM` is a reactive reference to `$item` — the current element in a [ForEach](/components/foreach) iteration. It gives you access to the entire item object, which is useful when you need to pass it whole to an action or reference it explicitly.

```python theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
from prefab_ui.components import Text, ForEach
from prefab_ui.rx import ITEM

with ForEach("crew"):
    Text(f"Name: {ITEM.name}")
```

## When You Need It

Most of the time you don't. Inside a `ForEach`, individual fields are available directly — `{{ name }}` works the same as `{{ $item.name }}`. But `ITEM` is valuable when:

**Passing the whole object to an action:**

```python theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
from prefab_ui.components import Button, ForEach
from prefab_ui.actions.mcp import CallTool
from prefab_ui.rx import ITEM

with ForEach("users"):
    Button(
        "Edit",
        on_click=CallTool(
            "edit_user",
            arguments={"user": str(ITEM)},
        ),
    )
```

**Disambiguating nested structures** where a field name might collide with a `let` binding or outer state key.

## Dot Paths

Attribute access chains as expected:

```python theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
from prefab_ui.rx import ITEM

ITEM.name          # → {{ $item.name }}
ITEM.address.city  # → {{ $item.address.city }}
```

## Import

```python theme={"theme":{"light":"snazzy-light","dark":"dark-plus"}}
from prefab_ui.rx import ITEM
```
