Getting Started

This guide walks you through the steps to embed the swap widget in your web3 decentralized application (dApp)

Quick Install

There are four methods you can inject the Gen widget into your program.

Method one - Query Widget.js in your <script> tag.

  1. input <script> tag in your front-end code.

  2. change the script src to "https://widget.0xgen.io/widget.js"

  3. refresh the page and check whether the component is installed.

<script src="https://widget.0xgen.io/widget.js"></script>

Method two - Use <iframe> to inject the Gen widget into your program.

  1. input <iframe> to your front-end code.

  2. change the iframe src to "https://widget.0xgen.io"

  3. refresh the page and check whether the component is installed.

<iframe src="https://widget.0xgen.io"></iframe>

We highly recommend using the custom mode to integrate wallets to make sure it works properly. More Details

Method three - Install the widget by using the 0xGen SDK module.

You can check the detail in the SDK section.

Method four - Install the widget by using the 0xGen API.

You can check the detail in the API section.

Last updated