Skip to content

Instantly share code, notes, and snippets.

@ajeetkumarrauniyar
Created April 28, 2024 09:11
Show Gist options
  • Save ajeetkumarrauniyar/e99ec6c3577daa4d02f548bb0cf60fe3 to your computer and use it in GitHub Desktop.
Save ajeetkumarrauniyar/e99ec6c3577daa4d02f548bb0cf60fe3 to your computer and use it in GitHub Desktop.
<li className="message-item assistant-message-container">
<div className="assistant-message">
<div className="loading-animation">
<div className="loading-circle purple"></div>
<div className="loading-circle blue"></div>
<div className="loading-circle green"></div>
</div>
</div>
</li>
.assistant-message-container {
display: flex;
justify-content: flex-start;
}
.assistant-message {
background-color: #fff;
align-self: flex-start;
word-wrap: break-word;
max-width: 90%;
margin-left: -10px;
margin-right: 0%;
border-radius: 20px 20px 20px 0;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
padding: 10px;
align-items: center;
}
.loading-animation {
display: flex;
justify-content: center;
align-items: center;
height: 30px;
}
.loading-circle {
width: 10px;
height: 10px;
border-radius: 50%;
background-color: #333;
margin: 0 5px;
animation: bounce 0.6s infinite alternate;
}
.purple {
background-color: #9b59b6;
}
.blue {
background-color: #3498db;
animation-delay: 0.2s;
}
.green {
background-color: #2ecc71;
animation-delay: 0.4s;
}
.loading-circle:nth-child(2) {
animation-delay: 0.2s;
}
.loading-circle:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes bounce {
from {
transform: translateY(0) rotate(0) scale(1);
}
to {
transform: translateY(-15px) rotate(360deg) scale(0.8);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment