# Utility Hooks
URL: /docs/api-reference/hooks/utilities

Focused helpers for message parts, quotes, timing, and viewport behavior.

Utility hooks expose commonly needed slices of assistant-ui behavior without requiring a full primitive.

## Message Helpers \[#message-helpers]

* `useMessageQuote` reads the quote state for the current message.
* `useMessageTiming` reads timing metadata for the current message.

## Message Part Helpers \[#message-part-helpers]

* `useMessagePartText`
* `useMessagePartReasoning`
* `useMessagePartSource`
* `useMessagePartFile`
* `useMessagePartImage`
* `useMessagePartData`

These hooks are intended for custom message part renderers. They read the nearest message part context established by `MessagePrimitive.Parts`, `MessagePartPrimitive`, or the lower-level providers.

## Viewport Helpers \[#viewport-helpers]

* `useThreadViewport` reads and controls the thread viewport.
* `useThreadViewportAutoScroll` wires auto-scroll behavior for custom viewport compositions.
* `useScrollLock` helps reasoning and grouped-part UIs preserve scroll behavior while content changes.

For primitive-specific prop APIs, see [Primitives](/docs/api-reference/primitives).
