Trip Element

Personalized travel restrictions and visa requirements for your trip.

Don't miss our QuickStart guide.

Introduction

Embed a Trip Element on your web platform using the sherpa° SDK. The Trip element provides personalized travel restrictions and visa requirements for travellers based on their itinerary.

The Element can be embedded on your web page with just a few lines of code. To see some ways you can use the Trip Element, check out our examples and the JS Fiddle.

🚧

App Id is required

You will receive a unique APP_ID during onboarding.

You need to include the sherpa° SDK by adding the script tag to the head of your HTML file and include your personalized APP_ID.

You will need to select the appropriate URL and APP_ID depending on whether you are using our Sandbox or Production environment:

<!-- PRODUCTION Envrionment -->
<script src="https://sdk.joinsherpa.io/widget.js?appId=<<APP_ID>>" defer></script>
<!-- SANDBOX Envrionment -->
<script src="https://sdk-sandbox.joinsherpa.io/widget.js?appId=<<SANDBOX_APP_ID>>" defer></script>

Next, create an instance of the Trip Element object and attach it to the DOM of your site by mounting it to an existing HTML element on your page.

We recommend placing an empty div element like <div id="sherpa-trip-element"></div> on your site to act as the mount point.

The element.mount accepts a valid CSS Selector.

$sherpa.V2.createElement('trip').mount('#sherpa-trip-element')

📘

Multiple element divs

Please note if no div element is passed the browser will automatically create a container at the next available space. If multiple div containers are created please ensure the correct <div> container name is passed for the above mount statement.