Documentation

Powered by Algolia

JavaScript


Available on Web platform.

You can integrate the Alan Button into a simple HTML page with JavaScript without any frameworks.

Installation

As a script:

  1. Add the script tag to the page:

    <script type="text/javascript" src="https://studio.alan.app/web/lib/alan_lib.min.js"></script>
  2. Add the Alan Button in the script tag like this:

    alanBtn({
        key: "YOUR_KEY_FROM_ALAN_STUDIO_HERE"
    });

As an NPM package:

  1. Install @alan-ai/alan-sdk-web using npm.

    $ npm install @alan-ai/alan-sdk-web --save
  2. Import alanBtn function from the @alan-ai/alan-sdk-web package and add the Alan Button to the page:

    import alanBtn from "@alan-ai/alan-sdk-web";
    
    alanBtn({
        key: "YOUR_KEY_FROM_ALAN_STUDIO_HERE"
    });