Skip to main content

Overlay Components

Overlay related components: StartupScreen, LoadingOverlay, StatusOverlay.

StartupScreen

Startup guide page component, used for scenarios requiring manual user activation (e.g., iOS iframe).

Basic Usage

<script setup lang="ts">
import {ref} from 'vue';
import {PilotKit, StartupScreen} from '@bdky/aaas-pilot-kit-vue3-widget';
import '@bdky/aaas-pilot-kit-vue3-widget/styles.css';

const showStartup = ref(false);
</script>

<template>
<PilotKit
@needManualActivation="showStartup = true"
v-bind="props"
>
<StartupScreen
:show="showStartup"
title="Start Conversation"
buttonText="Activate"
hintText="For better recognition results, please experience in a quiet environment"
@ready="showStartup = false"
>
<template #avatar>
<img src="/avatar.jpg" alt="" />
</template>
</StartupScreen>
</PilotKit>
</template>

Props

PropertyTypeDefaultDescription
showbooleanfalseWhether to show
classstring-Custom class name
styleCSSProperties-Custom style
backgroundUrlstring-Background image URL
titlestring'Start Conversation'Title
buttonTextstring'Start'Button text
hintTextstring-Hint text

Events

EventTypeDescription
@ready() => voidActivation success callback

Slots

SlotPropsDescription
default{onStart, isActivating}Custom render
avatar-Avatar element

Custom Rendering

<template>
<StartupScreen :show="showStartup" v-slot="{onStart, isActivating}">
<div class="my-startup">
<h1>Welcome</h1>
<button @click="onStart" :disabled="isActivating">
{{ isActivating ? 'Activating...' : 'Start Experience' }}
</button>
</div>
</StartupScreen>
</template>

Style Customization

Class NameDescription
.apk-startup-screen-wrapperOuter container
.apk-startup-screenInner container
.apk-startup-screen__contentContent area
.apk-startup-screen__avatar-wrapperAvatar wrapper
.apk-startup-screen__avatar-outerAvatar outer layer
.apk-startup-screen__titleTitle
.apk-startup-screen__hintHint text
.apk-startup-screen__buttonButton

LoadingOverlay

Loading overlay component.

Basic Usage

<script setup lang="ts">
import {ref} from 'vue';
import {PilotKit, LoadingOverlay} from '@bdky/aaas-pilot-kit-vue3-widget';
import '@bdky/aaas-pilot-kit-vue3-widget/styles.css';

const showLoading = ref(true);
</script>

<template>
<PilotKit @ready="showLoading = false" v-bind="props">
<LoadingOverlay
:show="showLoading"
title="Calling"
description="Connecting to digital employee..."
>
<template #avatar>
<img src="/avatar.jpg" alt="" />
</template>
</LoadingOverlay>
</PilotKit>
</template>

Props

PropertyTypeDefaultDescription
showbooleanfalseWhether to show
classstring-Custom class name
styleCSSProperties-Custom style
backgroundUrlstring-Background image URL
titlestring'Calling'Title
descriptionstring''Description text

Slots

SlotDescription
avatarAvatar element (with breathing animation)

Style Customization

Class NameDescription
.apk-loading-overlay-wrapperOuter container
.apk-loading-overlayInner container (frosted glass effect)
.apk-loading-overlay__contentContent area
.apk-loading-overlay__avatar-wrapperAvatar wrapper (with pulse animation)
.apk-loading-overlay__avatar-outerAvatar outer layer
.apk-loading-overlay__textTitle text
.apk-loading-overlay__tipDescription text

Animation

Avatar wrapper has pulse breathing animation, implemented through CSS @keyframes apk-calling-pulse.


StatusOverlay

Generic status overlay component, used for displaying busy, timeout, and other states.

Basic Usage

<script setup lang="ts">
import {ref} from 'vue';
import {PilotKit, StatusOverlay} from '@bdky/aaas-pilot-kit-vue3-widget';
import '@bdky/aaas-pilot-kit-vue3-widget/styles.css';

const showBusy = ref(false);
</script>

<template>
<StatusOverlay
v-if="showBusy"
show
message="Sorry, I'm busy right now, please try again later"
buttonText="Call Again"
backgroundUrl="/background.jpg"
@buttonClick="showBusy = false"
>
<template #avatar>
<img src="/avatar.jpg" alt="" />
</template>
</StatusOverlay>

<PilotKit v-else @busy="showBusy = true" v-bind="props">
<!-- ... -->
</PilotKit>
</template>

Responsive Adaptation

FeaturePCMobile
Content AlignmentVertical centerTop alignment + padding
Avatar Size120px100px
Font Size16px14px

Props

PropertyTypeDefaultDescription
showbooleanfalseWhether to show
variant'auto' | 'mobile' | 'desktop''auto'Display mode
classstring-Custom class name
styleCSSProperties-Custom style
backgroundUrlstring-Background image URL
avatar-Avatar element
messagestring-Status message
buttonTextstring'OK'Button text

Events

EventTypeDescription
@buttonClick() => voidButton click callback

Slots

SlotPropsDescription
default{avatar, message, buttonText, onButtonClick}Custom render
avatar-Avatar element

Custom Rendering

<template>
<StatusOverlay
:show="showStatus"
v-slot="{avatar, message, buttonText, onButtonClick}"
>
<div class="my-status">
<div class="avatar">
<slot name="avatar" />
</div>
<p class="message">{{ message }}</p>
<button @click="onButtonClick">{{ buttonText }}</button>
</div>
</StatusOverlay>
</template>

Style Customization

Class NameDescription
.apk-status-overlay-wrapperOuter container
.apk-status-overlayInner container (frosted glass effect)
.apk-status-overlay__contentContent area
.apk-status-overlay__avatar-wrapperAvatar wrapper
.apk-status-overlay__avatar-outerAvatar outer layer
.apk-status-overlay__messageStatus message
.apk-status-overlay__buttonAction button

Common Scenarios

<template>
<!-- Busy state -->
<StatusOverlay
:show="isBusy"
message="Sorry, I'm busy right now, please try again later"
buttonText="Call Again"
@buttonClick="handleRetry"
/>

<!-- Timeout state -->
<StatusOverlay
:show="isTimeout"
message="This conversation flow has ended, I've hung up"
buttonText="Start Again"
@buttonClick="handleRestart"
/>

<!-- Error state -->
<StatusOverlay
:show="hasError"
message="Connection failed, please check network and retry"
buttonText="Retry"
@buttonClick="handleRetry"
/>
</template>