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

# Widget Overview

> Drop-in swap widget for easy integration into any website or application

## What is the Houdini Widget?

The Houdini Widget is a pre-built, customizable swap interface that you can embed into any website or web application with just a few lines of code.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/houdini/images/widget-preview.png" alt="Houdini Widget Preview" />
</Frame>

## Key Features

<CardGroup cols={2}>
  <Card title="Drop-in Integration" icon="puzzle-piece">
    Add a full-featured swap interface in minutes with minimal code
  </Card>

  <Card title="Fully Customizable" icon="palette">
    Match your brand with custom colors, fonts, and styling
  </Card>

  <Card title="All Route Types" icon="route">
    Supports private, semi-private, and DEX swaps out of the box
  </Card>

  <Card title="Responsive Design" icon="mobile">
    Works perfectly on desktop, tablet, and mobile devices
  </Card>

  <Card title="Auto-Updated" icon="arrows-rotate">
    Maintained and updated by Houdini - always current
  </Card>

  <Card title="No Backend Required" icon="server">
    Widget handles all API calls - just provide your API key
  </Card>
</CardGroup>

## Quick Start

### Basic Embed

Add the widget to your page in 3 steps:

<Steps>
  <Step title="Include the script">
    ```html theme={null}
    <script src="https://app.houdiniswap.com/widget"></script>
    ```
  </Step>

  <Step title="Add container element">
    ```html theme={null}
    <div id="houdini-swap-widget"></div>
    ```
  </Step>

  <Step title="Initialize widget">
    ```javascript theme={null}
    HoudiniWidget.init({
      apiKey: 'your_api_key_here',
      container: '#houdini-swap-widget'
    });
    ```
  </Step>
</Steps>

### Complete Example

```html theme={null}
<!DOCTYPE html>
<html>
<head>
  <title>My App with Houdini</title>
</head>
<body>
  <div id="houdini-swap-widget"></div>

  <script src="https://app.houdiniswap.com/widget"></script>
  <script>
    HoudiniWidget.init({
      apiKey: 'your_api_key_here',
      container: '#houdini-swap-widget',
      theme: {
        primaryColor: '#16A34A',
        borderRadius: '12px'
      }
    });
  </script>
</body>
</html>
```

## Widget vs API Integration

| Feature                 | Widget                            | Direct API                       |
| ----------------------- | --------------------------------- | -------------------------------- |
| **Implementation Time** | Minutes                           | Days/Weeks                       |
| **Maintenance**         | Auto-updated by Houdini           | You maintain                     |
| **Customization**       | Theme customization               | Full control                     |
| **UI/UX**               | Pre-built, tested                 | Build from scratch               |
| **Backend Required**    | No                                | Yes (for security)               |
| **Best For**            | Quick integration, standard flows | Custom experiences, full control |
