Quick Start - embedded mode

Ramp Instant has two basic integration types - a hosted mode where it's opened in a new tab and an embedded mode where it's displayed in an overlay over your app.

If you want to embed Ramp Instant into your app instead of using the hosted version, this is the right place to learn how to do that.

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:

<script src="https://cdn.jsdelivr.net/npm/@ramp-network/ramp-instant-sdk/dist/ramp-instant-sdk.umd.min.js"><script>

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',

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.