VanillaJs Installation

VanillaJs library enables developers from other UI frameworks or libraries to integrate with Native Widget. There's a drawback to doing this because you need to import React and ReactDOM bundle which adds an overhead in your application.


<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8" />
    <!-- react 18-->
    <script crossorigin src=""></script>
    <script crossorigin src=""></script>
    <script defer src=""></script>
    <title>Vanilla Js Demo</title>
    <div id="ntv-swap-widget"></div>
  <script defer>
    document.addEventListener("DOMContentLoaded", function () {
      const root = ReactDOM.createRoot(
        React.createElement(NativeWidget.default, {
          apiKey: "API_KEY",

To install the widget you need an API key. Please follow these steps to acquire one.


Follow the Customisation Guide to customize your widget such as theme, supported chains, external wallet provider, etc.

Last updated