> ## Documentation Index
> Fetch the complete documentation index at: https://docs.raze.bot/llms.txt
> Use this file to discover all available pages before exploring further.

# iFrame Widget

> Integrate the Raze trading app as an iframe in your TypeScript application

# Trading App iFrame Widget with TypeScript

This guide shows how to integrate the trading app as an iframe in your TypeScript application and control wallet whitelisting programmatically.

## Installation

Embed the trading app as an iframe in your application:

```html theme={null}
<iframe 
  id="trading-iframe" 
  src="https://frame.raze.sh/sol/" 
  frameborder="0">
</iframe>
```

## Basic Setup

```typescript theme={null}
// Get iframe reference
const iframe = document.getElementById('trading-iframe') as HTMLIFrameElement;

// Listen for messages from iframe
window.addEventListener('message', (event: MessageEvent<IframeResponse>) => {
  if (event.source !== iframe.contentWindow) return;
  
  handleIframeMessage(event.data);
});

// Send message to iframe
function sendMessage(message: IframeMessage): void {
  iframe.contentWindow?.postMessage(message, '*');
}
```
