01상태 표시 뱃지 (온라인·자리비움·다른용무·오프라인)
온라인 점 뒤에 숨겨둔 테두리 링이 opacity 0.55→0 과 scale(.6→2.1)로 한 번씩 퍼져나가고, 자리비움·다른용무·오프라인 점은 색만 다른 채 움직이지 않아 온라인 상태만 눈에 띈다.
쓰임팀 채팅 멤버 목록, 고객센터 상담원 상태 표시
opacity+scale ring::before무대 paper

<main class="stage is-demo">
<ul class="pills" aria-label="상태 목록">
<li class="pill pill--online"><span class="dot" aria-hidden="true"></span>Online</li>
<li class="pill pill--away"><span class="dot" aria-hidden="true"></span>Away</li>
<li class="pill pill--busy"><span class="dot" aria-hidden="true"></span>Busy</li>
<li class="pill pill--offline"><span class="dot" aria-hidden="true"></span>Offline</li>
</ul>
</main>@use "../../../../site/static/demo-tokens" as *;
// ── 변수 3개 ──────────────────────────────────────────
$duration: $dur-loop; // 2s — 온라인 링 한 번 퍼짐
$easing: $ease-out;
$color: #50a26e; // 온라인 그린
@include stage($stage-paper);
.pills {
display: flex; flex-direction: column; gap: $sp-2;
margin: 0; padding: 0; list-style: none;
}
.pill {
display: inline-flex; align-items: center; gap: $sp-2;
padding: $sp-2 $sp-4;
border-radius: $r-pill;
background: #fff;
box-shadow: $shadow-press;
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
font-weight: 600;
font-size: 13px;
color: $subject-ink;
}
.dot {
position: relative;
width: 8px; height: 8px;
border-radius: 50%;
flex: 0 0 auto;
}
// 온라인 — 링만 애니메이션, 점 자체는 고정
.pill--online .dot {
background: $color;
}
.pill--online .dot::before {
content: "";
position: absolute; inset: -4px;
border-radius: 50%;
border: 2px solid $color;
opacity: 0;
transform: scale(.6);
}
.stage.is-demo .pill--online .dot::before {
animation: ping $duration $easing infinite;
}
// 나머지 셋은 정지 상태 — 대조군
.pill--away .dot { background: #b9a871; }
.pill--busy .dot { background: #be7c7c; }
.pill--offline .dot { background: #9ca3af; }
@keyframes ping {
0% { opacity: .55; transform: scale(.6); }
70%, 100% { opacity: 0; transform: scale(2.1); }
}
// ── 한 겹: 상태 전이 — pill 배경 그린 틴트 전이 + 두 번째 파문 링 (기존 ping 위에) ──
.pill--online { position: relative; }
.stage.is-demo .pill--online {
animation: pill-tint $duration $ease-out infinite;
}
.pill--online::after {
content: "";
position: absolute; inset: -8px; // dot::before(-4px)보다 큰 두 번째 링
border-radius: $r-pill;
border: 2px solid $color;
opacity: 0;
pointer-events: none;
}
.stage.is-demo .pill--online::after {
animation: pill-ripple $duration $easing infinite;
animation-delay: calc($duration / 3); // 첫 링을 뒤따라 확산
}
@keyframes pill-tint {
0%, 35% { background-color: #fff; }
55% { background-color: mix(#fff, $color, 88%); }
80%, 100% { background-color: #fff; }
}
@keyframes pill-ripple {
0% { opacity: .38; transform: scale(.95); }
70%, 100% { opacity: 0; transform: scale(1.16); }
}
@media (prefers-reduced-motion: reduce) {
.stage.is-demo .pill--online .dot::before { animation: none; opacity: 0; }
.stage.is-demo .pill--online { animation: none; }
.stage.is-demo .pill--online::after { animation: none; opacity: 0; }
}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);
}
.pills {
display: flex;
flex-direction: column;
gap: 8px;
margin: 0;
padding: 0;
list-style: none;
}
.pill {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 8px 16px;
border-radius: 999px;
background: #fff;
box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
font-weight: 600;
font-size: 13px;
color: #17141a;
}
.dot {
position: relative;
width: 8px;
height: 8px;
border-radius: 50%;
flex: 0 0 auto;
}
.pill--online .dot {
background: #50a26e;
}
.pill--online .dot::before {
content: "";
position: absolute;
inset: -4px;
border-radius: 50%;
border: 2px solid #50a26e;
opacity: 0;
transform: scale(0.6);
}
.stage.is-demo .pill--online .dot::before {
animation: ping 2s ease-out infinite;
}
.pill--away .dot {
background: #b9a871;
}
.pill--busy .dot {
background: #be7c7c;
}
.pill--offline .dot {
background: #9ca3af;
}
@keyframes ping {
0% {
opacity: 0.55;
transform: scale(0.6);
}
70%, 100% {
opacity: 0;
transform: scale(2.1);
}
}
.pill--online {
position: relative;
}
.stage.is-demo .pill--online {
animation: pill-tint 2s ease-out infinite;
}
.pill--online::after {
content: "";
position: absolute;
inset: -8px;
border-radius: 999px;
border: 2px solid #50a26e;
opacity: 0;
pointer-events: none;
}
.stage.is-demo .pill--online::after {
animation: pill-ripple 2s ease-out infinite;
animation-delay: 0.6666666667s;
}
@keyframes pill-tint {
0%, 35% {
background-color: #fff;
}
55% {
background-color: rgb(91.7647058824%, 95.6235294118%, 93.1764705882%);
}
80%, 100% {
background-color: #fff;
}
}
@keyframes pill-ripple {
0% {
opacity: 0.38;
transform: scale(0.95);
}
70%, 100% {
opacity: 0;
transform: scale(1.16);
}
}
@media (prefers-reduced-motion: reduce) {
.stage.is-demo .pill--online .dot::before {
animation: none;
opacity: 0;
}
.stage.is-demo .pill--online {
animation: none;
}
.stage.is-demo .pill--online::after {
animation: none;
opacity: 0;
}
}import type { CSSProperties } from "react";
import styles from "./StatusPillIndicator.module.scss";
export type StatusPillIndicatorProps = {
duration?: number;
easing?: string;
color?: string;
};
export default function StatusPillIndicator({
duration = 2000,
easing = "ease-out",
color = "#16a34a",
}: StatusPillIndicatorProps) {
const vars: CSSProperties = { "--duration": `${duration}ms`, "--easing": easing, "--color": color } as CSSProperties;
return (
<ul className={styles.pills} style={vars} aria-label="status list">
<li className={`${styles.pill} ${styles.online}`}><span className={styles.dot} />Online</li>
<li className={`${styles.pill} ${styles.away}`}><span className={styles.dot} />Away</li>
<li className={`${styles.pill} ${styles.busy}`}><span className={styles.dot} />Busy</li>
<li className={`${styles.pill} ${styles.offline}`}><span className={styles.dot} />Offline</li>
</ul>
);
}01 상태 표시 뱃지 (온라인·자리비움·다른용무·오프라인) — 측정 누적면적 3.128% · 움직인 프레임 16/23GODRICH 원작 · zip 에 SCSS·React 포함 · 태그 UI 디자인 9종 — 상태·우선순위·인증 배지 코드
이 데모가 속한 글
태그 UI 디자인 9종 — 상태·우선순위·인증 배지 코드태그 UI 디자인은 상태·카테고리·우선순위 같은 정보를 작은 알약이나 칩 모양으로 압축해 보여주는 장식이다. 온라인 점 하나, 우선순위 색 하나만 봐도 상태를 바로 알 수 있고, 움직임을 더하면 그대로 붙여서 훨씬 이 글의 데모 전부 보기


