Implementation
Note: the Widget requires React 18+
Last updated
Note: the Widget requires React 18+
Last updated
Use a tool such as ngrok () to get a unique URL for your web app running locally on your device and add it to your allowlist. See: .
Add your production domain by
Install the package in your project
or
Here is an example using a React component called "App".
For server-side rendered projects, please ensure to wrap the widget component inside a client-side rendered component. For NextJS, a simple way to do this is by using the 'use-client'
tag at the top of your file:
Note: if your flow does not include a wallet connect step, we also support an identifier type of 'email' and 'externalId' where the externalId can be any unique user identifier within your system.
When in desktop screen sizes: you must pass in the component around which the Widget will be positioned on the screen as a child component.
In this example, we use a button, however, you can use any component that suits your needs, as long as it is able to update isOpen state hook in the example.
This example uses a useState hook, however you can very well use other state hooks such as Redux, or other context providers.
The ChainVine widget uses the ChainVine SDK under the hood. The clientConfig prop of the Widget is an extension of the ChainVine SDK's ClientConfig constructor options.
Refer to the for how to setup testMode and ClientConfig options.
If you have any questions, or run into any issues, please do not hesitate to reach out on !