-
Notifications
You must be signed in to change notification settings - Fork 50
Home
There are a few ways you can easily integrate Torus into your DAPP! The easiest way is to simply include the script tag into your html as follows:
<script src="https://tor.us/embed-main.min.js"></script>
This will give you our default widget at the bottom left of your DAPP. If you would like to customize the widget styling we provide a few attributes in order to give a more appealing look according to your own needs:
- show-widget - Optional, wether or not you would like to show the widget at all. See 'Using Torus without the widget' section for more information.
- custom-style - Optional, wether or not you would like to add your own custom style to the widget. Required for following attributes.
- style-color - Background color of the widget in any form (hex, color name, etc.. Note: white not recommended)
- style-position - Position on the webpage. Options are top-left, top-right, bottom-left, bottom-right
- style-padding - Padding from the corner of the screen
- style-diameter - Diameter of the widget's circle
So in the scenario where you would like to add the widget to the bottom right of your website with a black background, you would include the following in the script tag:
<script src="https://tor.us/embed-main.min.js" custom-style=true style-color="black" style-position="bottom-right"></script>
To use Torus without the circular widget, there are a few more steps.
The first thing you'll want to do is still include the script tag, but this time with 'show-widget' set to false.
<script src="https://tor.us/embed-main.min.js" show-widget=false></script>