Quick Start - Overlay Mode

If you want to quickly embed Ramp into your app with an overlay, this is the right place to learn how to do that. This method will bring Ramp up as an overlay when the SDK is shown.

Getting the SDK

First, you'll need to add our SDK to your project.

If you use npm or yarn, run:

# npm
$ npm install @ramp-network/ramp-instant-sdk
# yarn
$ yarn add @ramp-network/ramp-instant-sdk

You can also use a CDN and a script tag. You can learn how to use this method here.

Using the SDK

In order to start the widget, you need to provide some basic configuration to the constructor of our SDK.

A basic example looks like this:

new RampInstantSDK({
hostAppName: 'Maker DAO',
hostLogoUrl: 'https://cdn-images-1.medium.com/max/2600/1*nqtMwugX7TtpcS-5c3lRjw.png',
}).show();

A more detailed list of the available configurations with examples can be found here.

That's it! Create an instance of the SDK with a configuration object and call the .show() method when you're ready to display Ramp Instant to your user.

It's important to remember that one instance of the SDK corresponds to one instance of the widget - if you want to close Ramp Instant and open it again, you'll need to initialize our SDK again.