Ionic Vue

Available on: Web platform Android iOS

To integrate an Ionic Vue app with Alan, you need to do the following:

  1. Create an Ionic Vue app

  2. Install Alan packages

  3. Add the Alan button

Step 1. Create an Ionic Vue app

If you want to create a voice-enabled app from scratch, in the Terminal, run the following commands. Otherwise move on to step 2.

npm install -g ionic
cd <appFolder>
ionic start <appName> <template> --type vue

For details, see Ionic documentation.

Step 2. Install Alan packages

You need to install the Alan SDK Cordova component and Alan Web Component package.

  1. Navigate to the folder where your app resides:

    cd appName
  2. Install the Alan SDK Cordova component:

    npm install @alan-ai/cordova-plugin-alan-voice --save
  3. Install the Alan Web Component package:

    npm install @alan-ai/alan-button --save


To be able to run Ionic apps on mobile devices, you must install the Alan button as the Web Component using the following packages: @alan-ai/alan-button and @alan-ai/cordova-plugin-alan-voice. Do not use the @alan-ai/alan-sdk-web package: it is intended for non cross-platform web apps and pages.

Step 3. Add the Alan button

You need to update your app to embed the Alan button to it.

  1. In the main.ts file, import the Alan button component and bind it to the window object:

    // Importing the Alan button component
    import {
    } from '@alan-ai/alan-button/dist/loader';
    // Binding custom components to the window object
    applyPolyfills().then(() => {
  2. In your Vue component, add the Alan button:

    <ion-content :fullscreen="true">
      <alan-button  alan-key="YOUR_KEY_FROM_ALAN_STUDIO_HERE" />
  3. In alan-key, replace YOUR_KEY_FROM_ALAN_STUDIO_HERE with the Alan SDK key for your Alan Studio project. To get the key, in Alan Studio, at the top of the code editor, click Integrations and copy the value from the Alan SDK Key field.

    <ion-content :fullscreen="true">
      <alan-button  alan-key="1c885a6adb85e9d57d43485dbc3cb44a2e956eca572e1d8b807a3e2338fdd0dc/stage" />

That’s it. You can now add voice commands to the script in Alan Studio, run the app, click the Alan button and interact with the app with voice.


Regularly update the Alan AI packages your project depends on. To check if a newer version is available, run npm outdated. To update the package, run npm update <alan-package-name>. For more details, see npm documentation.

What’s next?

Upon integration, your app gets the in-app voice assistant that can be activated with the Alan button displayed on top of the app’s UI.

To build a full-fledged multimodal UX, you can use Alan’s SDK toolkit:


Client API methods

Enable communication between the client app and Alan and perform actions in the app.

Learn more


Alan handlers

Handle commands, understand the button state and capture events in the client app.

Learn more


Example apps

Find and explore examples of voice-enabled apps on the Alan AI GitHub repository.

View on GitHub