# OverlayContext

`OverlayContext` is provided by [`OverlayProvider`](/chat/docs/sdk/react-native/v3/core-components/overlay-provider/) component. If you are not familiar with React Context API, please read about it on [React docs](https://reactjs.org/docs/context.html).

## Basic Usage

`OverlayContext` can be consumed by any of the child component of `OverlayProvider` component as following:

```tsx
import { useContext } from "react";
import { OverlayContext } from "stream-chat-react-native";

const { setBlurType, setOverlay } = useContext(OverlayContext);
```

Alternatively, you can also use `useOverlayContext` hook provided by library to consume OverlayContext.

```tsx
import { useOverlayContext } from "stream-chat-react-native";

const { setBlurType, setOverlay } = useOverlayContext();
```

## Value

### overlay

Current active overlay. Overlay gets rendered in following cases

- 'alert' - For delete message confirmation alert box
- 'gallery' - When image viewer/gallery is opened
- 'message' - When message overlay is opened by long pressing a message
- 'none' - Default value

| Type                                        |
| ------------------------------------------- |
| enum('alert', 'gallery', 'message', 'none') |

### setBlurType

<partial id="chat-sdk/react-native/v3/_partials/common-content/contexts/overlay-context/set_blur_type"></partial>

### `setOverlay`

<partial id="chat-sdk/react-native/v3/_partials/common-content/contexts/overlay-context/set_overlay"></partial>

---

This page was last updated at 2025-08-15T14:16:11.016Z.

For the most recent version of this documentation, visit [https://getstream.io/chat/docs/sdk/react-native/v3/contexts/overlay-context/](https://getstream.io/chat/docs/sdk/react-native/v3/contexts/overlay-context/).