LiveKit docs › Hooks › useLayoutContext

---

# useLayoutContext

Ensures that a layout context is provided via context. If no layout context is provided, an error is thrown.

## Import

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

```

## Returns

```typescript
LayoutContextType;

```

---

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

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