The recommended approach to installing xkit.js is to use a script tag which imports a custom version of xkit.js on your page as window.xkit
:
<script src="https://<your-slug>.xkit.co/xkit.js"></script>
However, you can also add xkit.js as an explicit dependency by installing from npm:
$ npm install @xkit-co/xkit.js
You can then import it as a Javascript module. You must configure it with the domain of your Xkit Platform (i.e. <your-slug>.xkit.co
):
import xkit from '@xkit-co/xkit.js`
const client = xkit('<your-slug>.xkit.co')