# LoadingWidget

> **Class** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/tui/widgets/loading/LoadingWidget)

Animated loading indicator with status text and elapsed time.

Displays: <spinner> Thinking... (3s, esc to interrupt)

## Signature

```python
LoadingWidget(
    self,
    status: str = 'Thinking',
    *,
    started_at: float | None = None,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `status` | `str` | No | Initial status text to display (default: `'Thinking'`) |
| `started_at` | `float \| None` | No | Turn start time (`time.time()` epoch seconds) the elapsed counter counts from. Pass the time the user's prompt was accepted so the counter includes pre-stream setup; defaults to widget mount. (default: `None`) |

## Extends

- `Static`

## Constructors

```python
__init__(
    self,
    status: str = 'Thinking',
    *,
    started_at: float | None = None,
) -> None
```

| Name | Type |
|------|------|
| `status` | `str` |
| `started_at` | `float \| None` |


## Properties

- `DEFAULT_CSS`

## Methods

- [`compose()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/loading/LoadingWidget/compose)
- [`on_mount()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/loading/LoadingWidget/on_mount)
- [`on_unmount()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/loading/LoadingWidget/on_unmount)
- [`remove()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/loading/LoadingWidget/remove)
- [`set_status()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/loading/LoadingWidget/set_status)
- [`pause()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/loading/LoadingWidget/pause)
- [`resume()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/loading/LoadingWidget/resume)
- [`stop()`](https://reference.langchain.com/python/deepagents-code/tui/widgets/loading/LoadingWidget/stop)

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/6a8d452d70f9bcb978e6bd44831dda093ecbe928/libs/code/deepagents_code/tui/widgets/loading.py#L54)