> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# 

# Overlay

An Overlay component for ReactLynx. It renders content in a native overlay layer above the main view tree.
:::info

You can check the [source code](https://github.com/lynx-family/lynx-ui/tree/main/packages/lynx-ui-overlay) to understand how it works, and you're welcome to submit PRs to enhance its capabilities.

:::

OverlayView is a drop-in replacement for `<overlay>`. Prefer using it over raw `<overlay>` to reduce setup work and avoid platform quirks and mistakes.

It can render either a plain `view` (when `container` is not provided) or an `<overlay>` (when `container` is provided). Prefer using `OverlayView` over raw `<overlay>`.

## Basic Usage

```tsx
import { OverlayView } from '@lynx-js/lynx-ui';

export function Example() {
  return (
    <OverlayView container="default">
      <view className="panel">
        <text>Overlay content</text>
      </view>
    </OverlayView>
  );
}
```

## Structure


```tsx
<OverlayView>
  {/* Your content */}
</OverlayView>
```

## Component API \{#api}

### OverlayView \{#api-overlay-view}


### OverlayViewRef \{#api-overlay-view-ref}

