Files
assistant/components/TypingIndicator.uvue

54 lines
1.1 KiB
Plaintext

<template>
<view v-if="visible" class="typing-indicator">
<view class="typing-indicator__bubble">
<view class="typing-indicator__dot" style="animation-delay: 0ms;"></view>
<view class="typing-indicator__dot" style="animation-delay: 150ms;"></view>
<view class="typing-indicator__dot" style="animation-delay: 300ms;"></view>
</view>
</view>
</template>
<script setup lang="uts">
defineProps<{
visible: boolean
}>()
</script>
<style scoped>
.typing-indicator {
display: flex;
align-items: flex-start;
padding: 8rpx 24rpx;
}
.typing-indicator__bubble {
display: flex;
flex-direction: row;
align-items: center;
padding: 20rpx 28rpx;
border-radius: 24rpx 24rpx 24rpx 4rpx;
background: rgba(255, 255, 255, 0.06);
border: 1px solid rgba(255, 255, 255, 0.08);
gap: 8rpx;
}
.typing-indicator__dot {
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: #6c5ce7;
animation: dotBounce 0.6s ease-in-out infinite;
}
@keyframes dotBounce {
0%, 60%, 100% {
transform: translateY(0);
opacity: 0.4;
}
30% {
transform: translateY(-10rpx);
opacity: 1;
}
}
</style>