01점 3개 바운스 — 순서를 인덱스로 계산해 튀는 기본형
입력 중인 상태가 되면 점 세 개가 나타나는데, 각 점이 튀어 오르는 시작 시점을 점의 순서 값에 간격을 곱해 다시 구해 물결처럼 순서대로 움직입니다.
쓰임1:1 채팅방 하단 말풍선, 고객센터 상담 위젯
animation-delaysetPropertyaria-live

<main class="stage">
<section class="panel">
<div class="row">
<span class="avatar" aria-hidden="true"></span>
<div class="bubble" role="status" aria-live="polite" aria-label="입력 중">
<span class="dot" data-i="0"></span>
<span class="dot" data-i="1"></span>
<span class="dot" data-i="2"></span>
</div>
</div>
</section>
</main>@use "../../../../site/static/demo-tokens" as *;
@include stage($stage-ink);
.panel {
display: flex;
flex-direction: column;
align-items: center;
gap: $sp-4;
}
.row {
display: flex;
align-items: center;
gap: $sp-3;
}
.avatar {
width: 32px;
height: 32px;
border-radius: $r-pill;
background: $subject-blue;
flex: none;
}
.bubble {
display: inline-flex;
align-items: center;
gap: $sp-2;
padding: $sp-3 $sp-4;
border-radius: $r-card;
background: $subject-cream;
}
.dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: $subject-ink;
animation-name: dotBounce;
animation-duration: $dur-loop;
animation-timing-function: $ease-spring;
animation-iteration-count: infinite;
animation-delay: var(--delay, 0ms);
}
@keyframes dotBounce {
0%, 60%, 100% { transform: translateY(0); opacity: .5; }
30% { transform: translateY(-6px); opacity: 1; }
}
@media (max-width: 340px) {
.bubble { padding: $sp-2 $sp-3; gap: $sp-1; }
.avatar { width: 26px; height: 26px; }
}
@media (prefers-reduced-motion: reduce) {
.dot { animation: none; opacity: .8; transform: none; }
}html, body {
margin: 0;
overflow: hidden;
}
.stage {
box-sizing: border-box;
min-height: 100vh;
display: grid;
place-items: center;
margin: 0;
background: #17141a;
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
padding: clamp(8px, 4vw, 24px);
}
.panel {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
}
.row {
display: flex;
align-items: center;
gap: 12px;
}
.avatar {
width: 32px;
height: 32px;
border-radius: 999px;
background: #2f6df6;
flex: none;
}
.bubble {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 12px 16px;
border-radius: 16px;
background: #fff7e6;
}
.dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #17141a;
animation-name: dotBounce;
animation-duration: 2s;
animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
animation-iteration-count: infinite;
animation-delay: var(--delay, 0ms);
}
@keyframes dotBounce {
0%, 60%, 100% {
transform: translateY(0);
opacity: 0.5;
}
30% {
transform: translateY(-6px);
opacity: 1;
}
}
@media (max-width: 340px) {
.bubble {
padding: 8px 12px;
gap: 4px;
}
.avatar {
width: 26px;
height: 26px;
}
}
@media (prefers-reduced-motion: reduce) {
.dot {
animation: none;
opacity: 0.8;
transform: none;
}
}// 점 3개 바운스 — 각 점이 튀어 오르는 시작 시점을 점의 순서(index) 값에 간격을 곱해 다시 구한다.
// 계산 겹: 인덱스 × 간격(ms) → animation-delay 재계산(setProperty). 자동 재생만, 실사용자 리스너 없음.
(function () {
var DOT_STAGGER_MS = 120;
var dots = document.querySelectorAll('.dot');
if (!dots.length) return;
dots.forEach(function (dot) {
var i = Number(dot.dataset.i || 0);
dot.style.setProperty('--delay', (i * DOT_STAGGER_MS) + 'ms');
});
})();import { useEffect, useRef } from "react";
import styles from "./TypingDotBounceBasic.module.scss";
// 점 3개 바운스 — 각 점이 튀어 오르는 시작 시점을 점의 순서(index) 값에 간격을 곱해 다시 구한다.
// 계산 겹: 인덱스 × 간격(ms) → animation-delay 재계산(setProperty). 자동 재생만, 실사용자 리스너 없음.
const DOT_STAGGER_MS = 120;
export default function TypingDotBounceBasic() {
const dot0Ref = useRef<HTMLSpanElement>(null);
const dot1Ref = useRef<HTMLSpanElement>(null);
const dot2Ref = useRef<HTMLSpanElement>(null);
useEffect(() => {
const dots = [dot0Ref.current, dot1Ref.current, dot2Ref.current];
dots.forEach((dot, i) => {
if (!dot) return;
dot.style.setProperty("--delay", i * DOT_STAGGER_MS + "ms");
});
}, []);
return (
<div className={styles.stage}>
<section className={styles.panel}>
<div className={styles.row}>
<span className={styles.avatar} aria-hidden="true" />
<div className={styles.bubble} role="status" aria-live="polite" aria-label="입력 중">
<span ref={dot0Ref} className={styles.dot} />
<span ref={dot1Ref} className={styles.dot} />
<span ref={dot2Ref} className={styles.dot} />
</div>
</div>
</section>
</div>
);
}01 점 3개 바운스 — 순서를 인덱스로 계산해 튀는 기본형 — 측정 누적면적 0.225% · 움직인 프레임 15/23GODRICH 원작 · zip 에 SCSS·React 포함 · 타이핑 인디케이터 UI 9종 — 점 3개부터 그룹 채팅까지
이 데모가 속한 글
타이핑 인디케이터 UI 9종 — 점 3개부터 그룹 채팅까지타이핑 인디케이터 아홉 개 중 하나는 입력 중이던 시간이 길수록 아바타 테두리가 느리게 뛰고, 하나는 그룹 채팅에서 입력자가 바뀔 때마다 남은 시간 값으로 이름표 폭을 다시 그리고, 또 하나는 진폭 값 배열로 음성 이 글의 데모 전부 보기


