09품절 스트라이프 오버레이
카드 전체를 덮은 어두운 레이어 위에 repeating-linear-gradient 사선 줄무늬가 background-position 이동으로 계속 흘러가고, 가운데 SOLD OUT 도장은 숨쉬듯 scale 이 오르내린다.
쓰임품절 상품 썸네일 오버레이, 마감된 이벤트·좌석 표시
repeating-linear-gradientbackground-position 애니메이션rgba 오버레이

<main class="stage is-demo">
<div class="card" aria-label="sold out">
<div class="thumb"></div>
<div class="overlay">
<span class="stamp">SOLD OUT</span>
</div>
</div>
</main>@use "../../../../site/static/demo-tokens" as *;
// ── 변수 3개 ──────────────────────────────────────────
$duration: $dur-loop; // 2s — 줄무늬 한 바퀴
$easing: linear;
$color: $stage-ink;
@include stage($stage-paper);
.card {
position: relative;
width: 220px; height: 140px;
border-radius: $r-card;
overflow: hidden;
box-shadow: $shadow-raised;
}
.thumb {
position: absolute; inset: 0;
background: linear-gradient(135deg, rgba($subject-blue, .25), rgba($subject-blue, .08));
}
.overlay {
position: absolute; inset: 0;
display: grid; place-items: center;
background:
repeating-linear-gradient(
-45deg,
rgba($color, .82) 0 $sp-4,
rgba($color, .62) $sp-4 #{$sp-4 * 2}
);
background-size: #{$sp-4 * 4} #{$sp-4 * 4};
}
.stamp {
padding: $sp-2 $sp-4;
border: 2px solid #fff;
border-radius: $r-sm;
color: #fff;
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
font-weight: 800;
font-size: 16px;
letter-spacing: .1em;
transform: scale(1) rotate(-6deg);
}
.stage.is-demo .overlay {
animation: stripes-flow $duration $easing infinite;
}
.stage.is-demo .stamp {
animation: stamp-breathe #{$duration} ease-in-out infinite;
}
@keyframes stripes-flow {
0% { background-position: 0 0; }
100% { background-position: #{$sp-4 * 4} 0; }
}
@keyframes stamp-breathe {
0%, 100% { transform: scale(1) rotate(-6deg); }
50% { transform: scale(1.08) rotate(-6deg); }
}
@media (prefers-reduced-motion: reduce) {
.stage.is-demo .overlay { animation: none; }
.stage.is-demo .stamp { animation: none; }
}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);
}
.card {
position: relative;
width: 220px;
height: 140px;
border-radius: 16px;
overflow: hidden;
box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}
.thumb {
position: absolute;
inset: 0;
background: linear-gradient(135deg, rgba(47, 109, 246, 0.25), rgba(47, 109, 246, 0.08));
}
.overlay {
position: absolute;
inset: 0;
display: grid;
place-items: center;
background: repeating-linear-gradient(-45deg, rgba(23, 20, 26, 0.82) 0 16px, rgba(23, 20, 26, 0.62) 16px 32px);
background-size: 64px 64px;
}
.stamp {
padding: 8px 16px;
border: 2px solid #fff;
border-radius: 8px;
color: #fff;
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
font-weight: 800;
font-size: 16px;
letter-spacing: 0.1em;
transform: scale(1) rotate(-6deg);
}
.stage.is-demo .overlay {
animation: stripes-flow 2s linear infinite;
}
.stage.is-demo .stamp {
animation: stamp-breathe 2s ease-in-out infinite;
}
@keyframes stripes-flow {
0% {
background-position: 0 0;
}
100% {
background-position: 64px 0;
}
}
@keyframes stamp-breathe {
0%, 100% {
transform: scale(1) rotate(-6deg);
}
50% {
transform: scale(1.08) rotate(-6deg);
}
}
@media (prefers-reduced-motion: reduce) {
.stage.is-demo .overlay {
animation: none;
}
.stage.is-demo .stamp {
animation: none;
}
}import type { CSSProperties } from "react";
import styles from "./BadgeSoldOutOverlay.module.scss";
export type BadgeSoldOutOverlayProps = {
duration?: number;
easing?: string;
color?: string;
label?: string;
};
export default function BadgeSoldOutOverlay({
duration = 2000,
easing = "linear",
color = "#17141a",
label = "SOLD OUT",
}: BadgeSoldOutOverlayProps) {
const vars: CSSProperties = { "--duration": `${duration}ms`, "--easing": easing, "--color": color } as CSSProperties;
return (
<div className={styles.card} style={vars} aria-label="sold out">
<div className={styles.thumb} />
<div className={styles.overlay}>
<span className={styles.stamp}>{label}</span>
</div>
</div>
);
}09 품절 스트라이프 오버레이 — 측정 누적면적 21.144% · 움직인 프레임 23/23GODRICH 원작 · zip 에 SCSS·React 포함 · 뱃지 디자인 UI 9종 — 신상·세일·인증 배지 코드
이 데모가 속한 글
뱃지 디자인 UI 9종 — 신상·세일·인증 배지 코드뱃지 디자인 UI는 상품 썸네일이나 이름 옆에 작게 붙어 지금 상태를 알려주는 라벨 장식이다. NEW·세일·인증·품절처럼 사진 없이 코드 몇 줄로 만들 수 있고, 움직임 하나만 더하면 복붙 몇 줄로도 훨씬 눈에 띈다 이 글의 데모 전부 보기


