LiveKit docs › Hooks › useMaybeLayoutContext

---

# useMaybeLayoutContext

Returns a layout context from the `LayoutContext` if it exists, otherwise `undefined`.

## Import

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

```

## Returns

```typescript
LayoutContextType | undefined;

```

---

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

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