[**@gram-ai/elements v1.33.0**](../README.md)

***

[@gram-ai/elements](../globals.md) / useChatId

# Function: useChatId()

> **useChatId**(): `string` \| `null`

Hook to access the current chat ID from the Elements context.
Works in both history-enabled and history-disabled modes.

## Returns

`string` \| `null`

The current chat ID, or null if not yet initialized
