LiveKit docs › Hooks › useChatToggle

---

# useChatToggle

The `useChatToggle` hook provides state and functions for toggling the chat window.

## Import

```typescript
import { useChatToggle } from "@livekit/components-react";

```

## Remarks

Depends on the `LayoutContext` to work properly.

## Properties

- **`{ props }.props`** _(React.ButtonHTMLAttributes<HTMLButtonElement>)_: 

## Returns

```typescript
{
    mergedProps: React.ButtonHTMLAttributes<HTMLButtonElement> & {
        className: string;
        onClick: () => void;
        'aria-pressed': string;
        'data-lk-unread-msgs': string;
    };
}

```

---

This document was rendered at 2026-06-07T11:32:05.071Z.
For the latest version of this document, see [https://docs.livekit.io/reference/components/react/hook/usechattoggle.md](https://docs.livekit.io/reference/components/react/hook/usechattoggle.md).

To explore all LiveKit documentation, see [llms.txt](https://docs.livekit.io/llms.txt).