# Context.panel
URL: https://lsd.tools/docs/api-context-panel
Updated: 2026-07-18

## Example

```python
@tool.view("demo/inspector", location="sidebar")
def inspector(ctx: Context):
    origin = ctx.panel      # the View this call came from (docked in the sidebar)
```

## Notes

A lazily populated slot — set to the originating **`View`** when the handler is dispatched from a
`@tool.view(location="sidebar")` surface (informally a *panel*), and `None` otherwise. There is no
`Panel` class; the attribute keeps its `panel` name for the docked-sidebar sense, but the value is a
`View`.

## See also

**API:** [viewer](/docs/api-context-viewer) · [ui](/docs/api-context-ui) · [Context](/docs/api-context)

**Guides:** [Commands & actions](/docs/tools-commands-actions)
