05ライブパルスドットバッジ
ドットの背後にある::before円がscaleで広がりながらopacityが0まで薄れることを繰り返し、レーダーのように信号が広がる様子を見せる。
使いどころライブ配信・進行中イベントの表示、オンライン状態インジケーター
::before scale·opacityaria-label@keyframes ping

<main class="stage is-demo">
<span class="badge" aria-label="live now">
<span class="dot"></span>
LIVE
</span>
</main>@use "../../../../site/static/demo-tokens" as *;
// ── 변수 3개 ──────────────────────────────────────────
$duration: $dur-loop; // 2s — 핑 한 주기
$easing: $ease-out;
$color: $error;
@include stage($stage-ink);
.badge {
display: inline-flex; align-items: center; gap: $sp-2;
padding: $sp-2 $sp-4;
border-radius: $r-pill;
background: rgba($stage-paper, .08);
color: $stage-paper;
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
font-weight: 700;
font-size: 18px;
letter-spacing: .1em;
}
.dot {
position: relative;
width: $sp-2; height: $sp-2;
border-radius: 50%;
background: $color;
}
.dot::before {
content: "";
position: absolute; inset: 0;
border-radius: 50%;
background: $color;
}
.stage.is-demo .dot::before {
animation: ping $duration $easing infinite;
}
@keyframes ping {
0% { transform: scale(1); opacity: .7; }
70%, 100% { transform: scale(2.6); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
.stage.is-demo .dot::before { 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: #17141a;
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
padding: clamp(8px, 4vw, 24px);
}
.badge {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 8px 16px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.08);
color: #ffffff;
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
font-weight: 700;
font-size: 18px;
letter-spacing: 0.1em;
}
.dot {
position: relative;
width: 8px;
height: 8px;
border-radius: 50%;
background: #c2361a;
}
.dot::before {
content: "";
position: absolute;
inset: 0;
border-radius: 50%;
background: #c2361a;
}
.stage.is-demo .dot::before {
animation: ping 2s ease-out infinite;
}
@keyframes ping {
0% {
transform: scale(1);
opacity: 0.7;
}
70%, 100% {
transform: scale(2.6);
opacity: 0;
}
}
@media (prefers-reduced-motion: reduce) {
.stage.is-demo .dot::before {
animation: none;
opacity: 0;
}
}import type { CSSProperties } from "react";
import styles from "./BadgeLivePulseDot.module.scss";
export type BadgeLivePulseDotProps = {
duration?: number;
easing?: string;
color?: string;
label?: string;
};
export default function BadgeLivePulseDot({
duration = 2000,
easing = "ease-out",
color = "#c2361a",
label = "LIVE",
}: BadgeLivePulseDotProps) {
const vars: CSSProperties = { "--duration": `${duration}ms`, "--easing": easing, "--color": color } as CSSProperties;
return (
<span className={styles.badge} style={vars} aria-label="live now">
<span className={styles.dot} />
{label}
</span>
);
}05 ライブパルスドットバッジ — 計測 累積面積 0.147% · 動いたフレーム 8/23GODRICH オリジナル · SCSS と React は zip に同梱 · 【コピペOK】css バッジ デザイン 9選 — NEW・SALE・認証バッジ
このデモが属する記事
【コピペOK】css バッジ デザイン 9選 — NEW・SALE・認証バッジサムネイルや名前の横に小さく貼りついて、いまの状態を一目で伝えるラベルがバッジです。新着・セール・認証済み・完売など、写真を使わずコードだけで作れます。ここに載せたcss バッジ デザインはどれもコピペOKで、画像ファイルは一切要りません。 この記事のデモをすべて見る


