Vesting Widget
Last updated
Last updated
Welcome to the Vesting Widget Integration Guide!
This guide will walk you through the steps to integrate the Vesting Widget into your project, enabling your community and investors to see and claim their tokens directly from your platform.
Follow these steps to set up and customize the widget according to your needs.
Before you begin, make sure you have the following:
Access to the projectās codebase where you intend to integrate the Vesting widget.
Familiarity with JavaScript/TypeScript and frontend development frameworks (e.g., React, Vue).
Note: This library is written in React.
To get started, you'll need to include the Vesting Widget in your project. You can install it using npm or yarn:
or
You can embed the widget using the following script in your HTML. It is compliant, so please check the browser compatibility before using.
To import and configure the widget in your project, you will need to specify the blockchain network and the addresses of the smart contracts.
If you are using NPM package with React app, it should look like this:
If you are using embeddable JS script, it will look like this:
The widget exposes several āattributesā (or āpropsā in React):
apiKey
api-key
Yes
tokenAddress
token-address
The token address to filter the list of vestings.
No
chainId
chain-id
Default chain ID, in number format.
No
customTokenImageUrl
custom-token-image-url
Replace the default token image with this.
No
We use Mantine with Vanilla Extract as the styling solution. They are TypeScript-based and fully typed.
You can use your own CSS file and override the existing styling with class / id selectors. We have several pre-defined classes for easier customization:
Generic/wrapper classes:
tf-vesting-widget-wrapper
tf-widget-container
Button classes:
tf-button-root
tf-button-inner
tf-button-label
tf-button-section
tf-button-loader
Alternatively you can also use regular CSS selector, or globally import a css file to customize the widget:
Please note, due to large number of sub-components, we cannot expose all the custom class names, so the CSS selector would be the best way if you want the widgetās style to be heavily modified.
Have a question? If you donāt find the answer below, please reach out to our support team.
The widget shows "Authentication errorā
Only whitelisted domains can use this widget, if you are seeing the āAuthentication errorā message it means your domain has not been whitelisted. Please reach out to the Team Finance team to perform the whitelisting.
The font/styling are not correct! How can I customize them?
The Vesting widget is distributed with minimal styling attached. You're free to modify the styling through regular CSS. See "Step 4: Widget Customization" for the pre-defined CSS classes that can be useful for customization.
The provided API Key for the widget, our support team to get one.
Only whitelisted domains can use this widget. Please contact Team Finance on or reach out in our to acquire a key.