Using JavaScript

In order to access the Xkit integration catalog, you need to have the following script available on your webpage:

<script src="https://<your-slug>.xkit.co/xkit-catalog.js"></script>

This will expose an object on window.xkit that will include all of the functions in xkit.js as well as those listed in this section.

However, you can also add xkit-catalog.js as an explicit dependency by installing from npm:

$ npm install @xkit-co/xkit-catalog.js

The npm package exports function which you must call to configure it with the domain of your Xkit Platform (i.e. <your-slug>.xkit.co):

const createXkit = import '@xkit-co/xkit-catalog.js'

const xkit = createXkit('<your-slug>.xkit.co')

The npm package also exports App, a React component.

Using React

If you are using React, you can install xkit-catalog.js react version from npm:

$ npm install @xkit-co/xkit-catalog-react.js

The npm package exports function which you must call to configure it with the domain of your Xkit Platform (i.e. <your-slug>.xkit.co):

import { createXkit } from '@xkit-co/xkit-catalog-react.js'

const xkit = createXkit('<your-slug>.xkit.co')

Also, you can take a look at our sample React app to see how to use React components.