3.0 Widget
The R3VL Widget is the quickest way to integrate the Reveel Protocol into your application natively.
Overview
The R3VL Widget is built with ReactJS but can be implemented as a Web Component thanks to the react-to-webcomponent library.
No matter which implementation or JS framework you are working with (Angular, Vue or just VanillaJS), this widget can be easily implemented with a simple HTML custom tag.
View live demo of the R3VL Widget.
Integrating the widget into your frontend
Add the package to your frontend app:
This library can be used agnostically as a Web Compnent, but still uses ReactJS & React Dom libraries under the hood. Installing both is a requirement in order for the widget to function properly.
Then run this instruction anywhere in your code
For ReactJS/NextJS projects, it is required to pass React library as a property to the component:
For ReactJS projects, it is possible to use a custom provider so that users don't have to connect their wallet for a second time.
You can interact with the widget in the R3vl public storybook link.
Here a live example of how to implement the R3VL Widget as a Web Component in a VanillaJS project
Using the Widget
The R3VL Widget closely mimics the UI and functionality of our web application.
Custom Styling (CSS)
At the moment the only way to customize the widget's look and feel is by overriding CSS rules on some classes defined for this specific purpose:
NOTES:
A project id is required for WalletConnect support, and can be set as a html/reactJS property:
Use one of the following two methods to access the smart contract address associated with a newly created Revenue Path
Listening "storage" DOM event:
For ReactJS implementation a callback function can be set as a prop:
Last updated