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

# Swap Widget

You can add the Mayan cross-chain swap widget to your website by including a few lines of code:

(example: [buybonk.com](https://buybonk.com))

```php theme={null}
 <script src="https://cdn.mayan.finance/widget/1_8_0/main.js"
  integrity="sha256-csokBs9wUf3aZCKTR7/XXElwXugjzCQeUygLmN+/Y7Y="
  defer
  crossorigin="anonymous"
  onload="initMayanWidget()"></script>
<script>
  const mayanConfigs = {
    "appIdentity": {
      "uri": "https://example.finance",
      "icon": "",
      "name": "Mayan Widget"
    },
    "setDefaultToken": true
  };
  function initMayanWidget() {
    const container = 'WIDGET_ROOT' // element id or DOM element
    document.addEventListener('DOMContentLoaded', function() {
      MayanSwap.init(container, mayanConfigs);
    })
  }
</script>
```

That's it! You now have a fully-functional bridge on your website.

### Customizing Your Widget

We provide a dashboard where you can fully customize your widget, including:

* Supported chains and token lists
* Referrer fees and referrer addresses for monetization
* Colors and overall appearance of the widget
* And more

Please visit the Mayan widget builder: [https://widget.mayan.finance](https://widget.mayan.finance)

<Frame>
  <img src="https://mintcdn.com/mayan/oxZGbtytzh3QqNZW/images/Screenshotfrom2026-03-2717-53-04.png?fit=max&auto=format&n=oxZGbtytzh3QqNZW&q=85&s=b3d259a086aa9cb1276604d3ad173149" alt="Screenshotfrom2026 03 2717 53 04" title="Screenshotfrom2026 03 2717 53 04" style={{ width:"74%" }} width="941" height="926" data-path="images/Screenshotfrom2026-03-2717-53-04.png" />
</Frame>

### Full Example

For a full example of the integration, you can check the source code of [buybonk.com](https://buybonk.com) on [GitHub](https://github.com/mayan-finance/buybonk). This repository provides a comprehensive example of how to integrate the Mayan Swap Widget into a project.
