Skip to content
Kyle Bryant edited this page Jan 4, 2019 · 8 revisions

Torus Integration Guide

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:

  1. 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.
  2. custom-style - Optional, wether or not you would like to add your own custom style to the widget. Required for following attributes.
  3. style-color - Background color of the widget in any form (hex, color name, etc.. Note: white not recommended)
  4. style-position - Position on the webpage. Options are top-left, top-right, bottom-left, bottom-right
  5. style-padding - Padding from the corner of the screen
  6. 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>

Using Torus without the widget

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>

Clone this wiki locally