Comment on page

Getting Started

We have built Leap Elements SDK as a react library, so it can be easily integrated into any react-based dApp.

Installation

yarn add @leapwallet/elements
Please make sure its added in ^version "Compatible with version" range so that you get latest updates and fixes with future releases

Overview

The library has a few different exports you can use, let's look at them

Liquidity Management

  • LiquidityView - a component with different tabs your users can use to manage liquidity
  • LiquidityModal - LiquidityView component wrapped in a modal

Individual Tabs

If you want to use individual tabs such as Cosmos Swaps, Cross Chain Swaps or On-Ramp, we also export them from the library. Read more about it here.

UI Customisations

We have made the components in such a way that you can customise the theme to match your dApps's unique style and brand identity. To know more about UI customisations, check out this page.

Type Definitions

We have exposed a lot of types and interfaces from the library as they are used in a lot of props and methods on the components. You can use this page for reference.
One such method is onTxnComplete callback. This is a prop in liquidity management components as well as individual tabs. This callback carries important data that you can use on your dApp, check out this page to learn more.