04メッセージバブルの登場
回答が完成すると、空いていた場所に吹き出しがscale 0.85から1、opacity 0から1へ弾むように現れ、回答が届いたことをはっきり知らせる。
使いどころ完成した回答バブルの登場、通知トーストの登場
scaleopacitycubic-bezier

<main class="stage">
<div class="bp-bubble is-demo">Here's the summary you asked for.</div>
</main>@use "../../../../site/static/demo-tokens" as *;
// ── 변수 3개 ──────────────────────────────────────────
$duration: $dur-loop;
$easing: $ease-pop;
$color: $subject-blue-deep; // 크림 글자가 얹히므로 진한 파랑
@include stage($stage-paper);
.bp-bubble {
max-width: min(280px, 84vw);
padding: $sp-4 $sp-5;
border-radius: $r-card;
box-sizing: border-box;
background: $color;
color: $subject-cream;
font: 500 14px/1.5 -apple-system, "Segoe UI", sans-serif;
box-shadow: $shadow-press;
}
// 실사용: 답변이 도착하는 순간 한 번만 재생 (transitionend 뒤 그대로 유지)
@keyframes bp-pop {
0% { transform: scale(.82); opacity: 0; }
15% { transform: scale(1.05); opacity: 1; }
25% { transform: scale(1); opacity: 1; }
70% { transform: scale(1); opacity: 1; }
85% { transform: scale(.9); opacity: 0; }
100% { transform: scale(.82); opacity: 0; }
}
.bp-bubble.is-demo {
animation: bp-pop $duration $easing infinite;
}
@media (prefers-reduced-motion: reduce) {
.bp-bubble.is-demo {
animation: none !important;
transform: none !important;
opacity: 1 !important;
}
}html, body {
margin: 0;
overflow: hidden;
}
.stage {
box-sizing: border-box;
min-height: 100vh;
display: grid;
place-items: center;
margin: 0;
background: #ffffff;
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
padding: clamp(8px, 4vw, 24px);
}
.bp-bubble {
max-width: min(280px, 84vw);
padding: 16px 20px;
border-radius: 16px;
box-sizing: border-box;
background: #0a4fe8;
color: #fff7e6;
font: 500 14px/1.5 -apple-system, "Segoe UI", sans-serif;
box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}
@keyframes bp-pop {
0% {
transform: scale(0.82);
opacity: 0;
}
15% {
transform: scale(1.05);
opacity: 1;
}
25% {
transform: scale(1);
opacity: 1;
}
70% {
transform: scale(1);
opacity: 1;
}
85% {
transform: scale(0.9);
opacity: 0;
}
100% {
transform: scale(0.82);
opacity: 0;
}
}
.bp-bubble.is-demo {
animation: bp-pop 2s cubic-bezier(0.2, 1.4, 0.4, 1) infinite;
}
@media (prefers-reduced-motion: reduce) {
.bp-bubble.is-demo {
animation: none !important;
transform: none !important;
opacity: 1 !important;
}
}import { CSSProperties } from "react";
import styles from "./BubblePopIn.module.scss";
type Vars = CSSProperties & {
"--duration"?: string;
"--easing"?: string;
"--color"?: string;
};
export interface BubblePopInProps {
duration?: string;
easing?: string;
color?: string;
text?: string;
}
export default function BubblePopIn({
duration = "2s",
easing = "cubic-bezier(.2, 1.4, .4, 1)",
color = "#0a4fe8",
text = "Here's the summary you asked for.",
}: BubblePopInProps) {
const style: Vars = {
"--duration": duration,
"--easing": easing,
"--color": color,
};
return (
<div className={styles.bubble} style={style}>
{text}
</div>
);
}04 メッセージバブルの登場 — 計測 累積面積 13.303% · 動いたフレーム 8/23GODRICH オリジナル · SCSS と React は zip に同梱 · 【コピペOK】AIチャット ローディング アニメーション css 9選
このデモが属する記事
【コピペOK】AIチャット ローディング アニメーション css 9選ChatGPTやClaudeのようなAIチャットに質問を送ると、返事が来るまでの数秒間、小さな点が順番に光ったり、画面の文字がふわっと浮かび上がったりする瞬間を見たことはないでしょうか。この記事はその「考え中」の合図を作るローディング アニ この記事のデモをすべて見る


