01코너 리본 뱃지
카드 모서리를 -45deg 로 가로지르는 리본 위에 흰 빛줄기(::after 그라데이션)가 반복해서 지나가, 정지된 뱃지도 가만히 있지 않고 시선을 끈다.
쓰임쇼핑몰 신상품 썸네일, 방금 올라온 공지·이벤트 카드
rotate(-45deg)::after 빛줄기 스윕overflow: hidden

<main class="stage is-demo">
<div class="card" aria-label="new arrival">
<div class="thumb"></div>
<div class="ribbon-wrap">
<span class="ribbon">NEW</span>
</div>
</div>
</main>@use "../../../../site/static/demo-tokens" as *;
// ── 변수 3개 ──────────────────────────────────────────
$duration: $dur-loop; // 2s — 빛줄기 한 주기
$easing: $ease-out;
$color: #50a26e; // NEW 리본 그린
@include stage($stage-yellow);
.card {
position: relative;
width: 220px; height: 140px;
border-radius: $r-card;
overflow: hidden;
background: $subject-cream;
box-shadow: $shadow-raised;
}
.thumb {
position: absolute; inset: 0;
background: linear-gradient(135deg, rgba($subject-blue, .12), rgba($subject-blue, .04));
}
.ribbon-wrap {
position: absolute;
top: $sp-6; left: -$sp-10;
width: 160px;
transform: rotate(-45deg);
overflow: hidden;
}
.ribbon {
position: relative;
display: block;
padding: $sp-1 0;
background: $color;
color: $subject-ink;
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
font-weight: 700;
font-size: 13px;
letter-spacing: .06em;
text-align: center;
box-shadow: $shadow-press;
}
// 빛줄기 ::after — background-position 만 움직인다 (레이아웃은 그대로)
.ribbon::after {
content: "";
position: absolute; inset: 0;
background: linear-gradient(115deg, transparent 15%, rgba(255, 255, 255, .7) 45%, transparent 75%);
background-size: 220% 100%;
background-position: 140% 0;
}
.stage.is-demo .ribbon::after {
animation: shine-sweep $duration $easing infinite;
}
@keyframes shine-sweep {
0%, 15% { background-position: 140% 0; }
55% { background-position: -40% 0; }
100% { background-position: -40% 0; }
}
@media (prefers-reduced-motion: reduce) {
.stage.is-demo .ribbon::after { animation: none; background-position: 30% 0; }
}html, body {
margin: 0;
overflow: hidden;
}
.stage {
box-sizing: border-box;
min-height: 100vh;
display: grid;
place-items: center;
margin: 0;
background: #ffd23f;
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;
background: #fff7e6;
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.12), rgba(47, 109, 246, 0.04));
}
.ribbon-wrap {
position: absolute;
top: 24px;
left: -40px;
width: 160px;
transform: rotate(-45deg);
overflow: hidden;
}
.ribbon {
position: relative;
display: block;
padding: 4px 0;
background: #50a26e;
color: #17141a;
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
font-weight: 700;
font-size: 13px;
letter-spacing: 0.06em;
text-align: center;
box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
}
.ribbon::after {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(115deg, transparent 15%, rgba(255, 255, 255, 0.7) 45%, transparent 75%);
background-size: 220% 100%;
background-position: 140% 0;
}
.stage.is-demo .ribbon::after {
animation: shine-sweep 2s ease-out infinite;
}
@keyframes shine-sweep {
0%, 15% {
background-position: 140% 0;
}
55% {
background-position: -40% 0;
}
100% {
background-position: -40% 0;
}
}
@media (prefers-reduced-motion: reduce) {
.stage.is-demo .ribbon::after {
animation: none;
background-position: 30% 0;
}
}import type { CSSProperties } from "react";
import styles from "./BadgeNewRibbon.module.scss";
export type BadgeNewRibbonProps = {
duration?: number;
easing?: string;
color?: string;
label?: string;
};
export default function BadgeNewRibbon({
duration = 2000,
easing = "ease-out",
color = "#16a34a",
label = "NEW",
}: BadgeNewRibbonProps) {
const vars: CSSProperties = { "--duration": `${duration}ms`, "--easing": easing, "--color": color } as CSSProperties;
return (
<div className={styles.card} style={vars} aria-label="new arrival">
<div className={styles.thumb} />
<div className={styles.ribbonWrap}>
<span className={styles.ribbon}>{label}</span>
</div>
</div>
);
}01 코너 리본 뱃지 — 측정 누적면적 1.912% · 움직인 프레임 9/23GODRICH 원작 · zip 에 SCSS·React 포함 · 뱃지 디자인 UI 9종 — 신상·세일·인증 배지 코드
이 데모가 속한 글
뱃지 디자인 UI 9종 — 신상·세일·인증 배지 코드뱃지 디자인 UI는 상품 썸네일이나 이름 옆에 작게 붙어 지금 상태를 알려주는 라벨 장식이다. NEW·세일·인증·품절처럼 사진 없이 코드 몇 줄로 만들 수 있고, 움직임 하나만 더하면 복붙 몇 줄로도 훨씬 눈에 띈다 이 글의 데모 전부 보기


