09친구 추천 코드 메일
추천 코드 알약 아래 점 세 개가 왼쪽부터 차올라 두 개까지 채워지고, 세 번째가 비어 있어 한 명만 더 초대하면 된다는 걸 보여줍니다.
쓰임친구 추천 캠페인, 적립 보상 안내
animation-fill-mode: backwardsletter-spacingaria-label

<main class="stage">
<div class="mk is-demo" id="mk">
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" class="mk__table">
<tr><td align="center" class="mk__wrap">
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" class="mk__card" style="max-width:400px">
<tr><td class="mk__brand">◆ Acme</td></tr>
<tr><td align="center" class="mk__hero">
<span class="mk__badge" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" class="mk__ico"><path d="M168,144a40,40,0,1,1-40-40A40,40,0,0,1,168,144ZM64,56A32,32,0,1,0,96,88,32,32,0,0,0,64,56Zm128,0a32,32,0,1,0,32,32A32,32,0,0,0,192,56Z" opacity="0.2"/><path d="M244.8,150.4a8,8,0,0,1-11.2-1.6A51.6,51.6,0,0,0,192,128a8,8,0,0,1,0-16,24,24,0,1,0-23.24-30,8,8,0,1,1-15.5-4A40,40,0,1,1,219,117.51a67.94,67.94,0,0,1,27.43,21.68A8,8,0,0,1,244.8,150.4ZM190.92,212a8,8,0,1,1-13.85,8,57,57,0,0,0-98.15,0,8,8,0,1,1-13.84-8,72.06,72.06,0,0,1,33.74-29.92,48,48,0,1,1,58.36,0A72.06,72.06,0,0,1,190.92,212ZM128,176a32,32,0,1,0-32-32A32,32,0,0,0,128,176ZM72,120a8,8,0,0,0-8-8A24,24,0,1,1,87.24,82a8,8,0,1,0,15.5-4A40,40,0,1,0,37,117.51,67.94,67.94,0,0,0,9.6,139.19a8,8,0,1,0,12.8,9.61A51.6,51.6,0,0,1,64,128,8,8,0,0,0,72,120Z"/></svg></span>
</td></tr>
<tr><td align="center" class="mk__title">친구를 초대하면 둘 다 10,000원</td></tr>
<tr><td align="center" class="mk__body">아래 코드로 친구가 가입하면, 두 분 모두 쿠폰을 드려요.</td></tr>
<tr><td class="mk__coderow">
<span class="mk__code" id="code">GODRICH-9K2F</span>
<button type="button" class="mk__copy" id="copybtn" aria-label="추천 코드 복사">복사</button>
</td></tr>
<tr><td class="mk__dotsrow">
<div class="mk__dots" role="img" aria-label="초대 3칸 중 2칸 완료">
<span class="mk__dot mk__dotfill d1"></span>
<span class="mk__dot mk__dotfill d2"></span>
<span class="mk__dot"></span>
</div>
<span class="mk__dotslabel">2 / 3 초대 완료 — 한 명 더!</span>
</td></tr>
<tr><td align="center" class="mk__ctawrap"><a href="#" role="button" class="mk__cta">친구 초대하기</a></td></tr>
<tr><td align="center" class="mk__live" id="live" aria-live="polite"></td></tr>
<tr><td align="center" class="mk__footer">Acme Inc · 서울 · <a href="#" class="mk__unsub">수신거부</a></td></tr>
</table>
</td></tr>
</table>
</div>
</main>@use "../../../../site/static/demo-tokens" as *;
$duration: $dur-base;
$easing: $ease-pop;
$color: $subject-lilac;
@include stage($stage-ink);
.stage { position: relative; }
.mk { width: min(100%, 400px); }
.mk__table { border-collapse: collapse; }
.mk__wrap { padding: 0; }
.mk__card {
border-collapse: collapse; background: $stage-paper; border-radius: $r-card;
box-shadow: $shadow-raised; overflow: hidden;
}
.mk__card td { padding: $sp-1 $sp-5; font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif; -webkit-text-size-adjust: 100%; line-height: 1; }
.mk__brand { font-weight: 800; font-size: 11px; line-height: 1; color: rgba(23,20,26,.62); letter-spacing: .02em; padding-top: $sp-2 !important; }
.mk__hero { padding-top: $sp-1 !important; padding-bottom: 0 !important; }
.mk__badge {
display: inline-flex; align-items: center; justify-content: center;
width: clamp(26px, 8vw, 34px); height: clamp(26px, 8vw, 34px); border-radius: 50%;
background: $subject-lilac; color: $subject-ink;
}
.mk__ico { width: 60%; height: 60%; }
.mk__title { font-weight: 800; font-size: clamp(12px, 3.6vw, 14px); line-height: 1.25; color: $subject-ink; padding-top: $sp-1 !important; }
.mk__body { font-weight: 500; font-size: clamp(10px, 3vw, 11px); line-height: 1.4; color: rgba(23,20,26,.62); padding-top: 0 !important; padding-bottom: $sp-1 !important; }
.mk__coderow { padding-top: 0 !important; padding-bottom: 0 !important; }
.mk__code {
display: inline-block; font-weight: 800; font-size: clamp(12px, 3.8vw, 15px); line-height: 1.2;
letter-spacing: .12em; color: #5b3fc4; background: rgba(185,160,255,.14);
border-radius: $r-pill; padding: $sp-1 $sp-4; font-variant-numeric: tabular-nums;
}
.mk__copy {
display: inline-block; margin-left: $sp-2; font-family: inherit; font-weight: 700; font-size: 10px; line-height: 1.6;
color: $subject-ink; background: $subject-lilac; border: none; border-radius: $r-pill;
padding: $sp-1 $sp-3; cursor: pointer;
}
.mk__copy:focus-visible { outline: 2px solid $subject-ink; outline-offset: 2px; }
.mk__dotsrow { padding-top: $sp-2 !important; padding-bottom: 0 !important; }
.mk__dots { display: inline-flex; align-items: center; gap: $sp-1; }
.mk__dot {
width: 10px; height: 10px; border-radius: 50%; background: none;
border: 2px solid rgba(23,20,26,.2); box-sizing: border-box;
}
.mk__dotfill { border-color: #5b3fc4; background: #5b3fc4; }
.mk__dotslabel { margin-left: $sp-2; font-weight: 600; font-size: 9px; line-height: 1.3; color: rgba(23,20,26,.62); }
.mk__ctawrap { padding-top: $sp-2 !important; padding-bottom: $sp-1 !important; }
.mk__cta {
display: inline-block; padding: $sp-1 $sp-6; font-weight: 700; font-size: 11px; line-height: 1.6;
font-family: inherit; color: $subject-cream; text-decoration: none; border-radius: $r-control;
background: $subject-ink;
}
.mk__live { font-weight: 600; font-size: 9px; line-height: 1.4; color: rgba(23,20,26,.62); padding: 0 !important; min-height: 12px; }
.mk__footer { font-weight: 500; font-size: 8px; line-height: 1.4; color: rgba(23,20,26,.62); padding-top: $sp-1 !important; padding-bottom: $sp-2 !important; }
.mk__footer a { color: inherit; }
// ── 미리보기 루프: 점 두 개가 차례로 차오르고(셋째는 비어 있음), 코드 알약이 살짝 숨쉰다 (2s 주기, 복귀 88%)
.mk.is-demo .d1 { animation-name: rfDot; animation-duration: 2s; animation-timing-function: $ease-pop; animation-iteration-count: infinite; animation-delay: 160ms; animation-fill-mode: backwards; }
.mk.is-demo .d2 { animation-name: rfDot; animation-duration: 2s; animation-timing-function: $ease-pop; animation-iteration-count: infinite; animation-delay: 380ms; animation-fill-mode: backwards; }
.mk.is-demo .mk__code { animation-name: rfPill; animation-duration: 2s; animation-timing-function: $ease-out; animation-iteration-count: infinite; }
@keyframes rfDot {
0% { transform: scale(0); background: transparent; border-color: rgba(23,20,26,.2); }
18%, 84% { transform: scale(1); background: #5b3fc4; border-color: #5b3fc4; }
88%, 100% { transform: scale(0); background: transparent; border-color: rgba(23,20,26,.2); }
}
@keyframes rfPill {
0%, 12% { transform: translateY(4px); opacity: 0; }
30%, 84% { transform: translateY(0); opacity: 1; }
92%, 100% { transform: translateY(4px); opacity: 0; }
}
// ── 320×200 폰 실측 대비 압축 (BD9)
@media (max-width: 340px), (max-height: 220px) {
.mk__card td { padding-left: $sp-3; padding-right: $sp-3; padding-top: 0; padding-bottom: 0; }
.mk__brand { padding-top: 0 !important; font-size: 9px !important; }
.mk__badge { width: 22px; height: 22px; }
.mk__title { font-size: 11px !important; padding-top: 0 !important; }
.mk__body { font-size: 8px !important; padding-bottom: 0 !important; }
.mk__code { font-size: 10px !important; padding: 0 $sp-3 !important; }
.mk__copy { font-size: 9px !important; padding: 0 $sp-2 !important; margin-left: $sp-1 !important; }
.mk__dot { width: 8px; height: 8px; }
.mk__dotslabel { font-size: 8px !important; }
.mk__dotsrow { padding-top: $sp-1 !important; }
.mk__ctawrap { padding-top: $sp-1 !important; }
.mk__cta { padding: 0 $sp-5 !important; font-size: 10px !important; }
.mk__live { min-height: 0; font-size: 8px !important; }
.mk__footer { font-size: 7px !important; padding-top: 0 !important; padding-bottom: $sp-1 !important; }
}
@media (prefers-reduced-motion: reduce) {
.mk.is-demo .d1,
.mk.is-demo .d2,
.mk.is-demo .mk__code { animation: none !important; transform: none; opacity: 1; }
}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);
}
.stage {
position: relative;
}
.mk {
width: min(100%, 400px);
}
.mk__table {
border-collapse: collapse;
}
.mk__wrap {
padding: 0;
}
.mk__card {
border-collapse: collapse;
background: #ffffff;
border-radius: 16px;
box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
overflow: hidden;
}
.mk__card td {
padding: 4px 20px;
font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
-webkit-text-size-adjust: 100%;
line-height: 1;
}
.mk__brand {
font-weight: 800;
font-size: 11px;
line-height: 1;
color: rgba(23, 20, 26, 0.62);
letter-spacing: 0.02em;
padding-top: 8px !important;
}
.mk__hero {
padding-top: 4px !important;
padding-bottom: 0 !important;
}
.mk__badge {
display: inline-flex;
align-items: center;
justify-content: center;
width: clamp(26px, 8vw, 34px);
height: clamp(26px, 8vw, 34px);
border-radius: 50%;
background: #b9a0ff;
color: #17141a;
}
.mk__ico {
width: 60%;
height: 60%;
}
.mk__title {
font-weight: 800;
font-size: clamp(12px, 3.6vw, 14px);
line-height: 1.25;
color: #17141a;
padding-top: 4px !important;
}
.mk__body {
font-weight: 500;
font-size: clamp(10px, 3vw, 11px);
line-height: 1.4;
color: rgba(23, 20, 26, 0.62);
padding-top: 0 !important;
padding-bottom: 4px !important;
}
.mk__coderow {
padding-top: 0 !important;
padding-bottom: 0 !important;
}
.mk__code {
display: inline-block;
font-weight: 800;
font-size: clamp(12px, 3.8vw, 15px);
line-height: 1.2;
letter-spacing: 0.12em;
color: #5b3fc4;
background: rgba(185, 160, 255, 0.14);
border-radius: 999px;
padding: 4px 16px;
font-variant-numeric: tabular-nums;
}
.mk__copy {
display: inline-block;
margin-left: 8px;
font-family: inherit;
font-weight: 700;
font-size: 10px;
line-height: 1.6;
color: #17141a;
background: #b9a0ff;
border: none;
border-radius: 999px;
padding: 4px 12px;
cursor: pointer;
}
.mk__copy:focus-visible {
outline: 2px solid #17141a;
outline-offset: 2px;
}
.mk__dotsrow {
padding-top: 8px !important;
padding-bottom: 0 !important;
}
.mk__dots {
display: inline-flex;
align-items: center;
gap: 4px;
}
.mk__dot {
width: 10px;
height: 10px;
border-radius: 50%;
background: none;
border: 2px solid rgba(23, 20, 26, 0.2);
box-sizing: border-box;
}
.mk__dotfill {
border-color: #5b3fc4;
background: #5b3fc4;
}
.mk__dotslabel {
margin-left: 8px;
font-weight: 600;
font-size: 9px;
line-height: 1.3;
color: rgba(23, 20, 26, 0.62);
}
.mk__ctawrap {
padding-top: 8px !important;
padding-bottom: 4px !important;
}
.mk__cta {
display: inline-block;
padding: 4px 24px;
font-weight: 700;
font-size: 11px;
line-height: 1.6;
font-family: inherit;
color: #fff7e6;
text-decoration: none;
border-radius: 12px;
background: #17141a;
}
.mk__live {
font-weight: 600;
font-size: 9px;
line-height: 1.4;
color: rgba(23, 20, 26, 0.62);
padding: 0 !important;
min-height: 12px;
}
.mk__footer {
font-weight: 500;
font-size: 8px;
line-height: 1.4;
color: rgba(23, 20, 26, 0.62);
padding-top: 4px !important;
padding-bottom: 8px !important;
}
.mk__footer a {
color: inherit;
}
.mk.is-demo .d1 {
animation-name: rfDot;
animation-duration: 2s;
animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
animation-iteration-count: infinite;
animation-delay: 160ms;
animation-fill-mode: backwards;
}
.mk.is-demo .d2 {
animation-name: rfDot;
animation-duration: 2s;
animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
animation-iteration-count: infinite;
animation-delay: 380ms;
animation-fill-mode: backwards;
}
.mk.is-demo .mk__code {
animation-name: rfPill;
animation-duration: 2s;
animation-timing-function: ease-out;
animation-iteration-count: infinite;
}
@keyframes rfDot {
0% {
transform: scale(0);
background: transparent;
border-color: rgba(23, 20, 26, 0.2);
}
18%, 84% {
transform: scale(1);
background: #5b3fc4;
border-color: #5b3fc4;
}
88%, 100% {
transform: scale(0);
background: transparent;
border-color: rgba(23, 20, 26, 0.2);
}
}
@keyframes rfPill {
0%, 12% {
transform: translateY(4px);
opacity: 0;
}
30%, 84% {
transform: translateY(0);
opacity: 1;
}
92%, 100% {
transform: translateY(4px);
opacity: 0;
}
}
@media (max-width: 340px), (max-height: 220px) {
.mk__card td {
padding-left: 12px;
padding-right: 12px;
padding-top: 0;
padding-bottom: 0;
}
.mk__brand {
padding-top: 0 !important;
font-size: 9px !important;
}
.mk__badge {
width: 22px;
height: 22px;
}
.mk__title {
font-size: 11px !important;
padding-top: 0 !important;
}
.mk__body {
font-size: 8px !important;
padding-bottom: 0 !important;
}
.mk__code {
font-size: 10px !important;
padding: 0 12px !important;
}
.mk__copy {
font-size: 9px !important;
padding: 0 8px !important;
margin-left: 4px !important;
}
.mk__dot {
width: 8px;
height: 8px;
}
.mk__dotslabel {
font-size: 8px !important;
}
.mk__dotsrow {
padding-top: 4px !important;
}
.mk__ctawrap {
padding-top: 4px !important;
}
.mk__cta {
padding: 0 20px !important;
font-size: 10px !important;
}
.mk__live {
min-height: 0;
font-size: 8px !important;
}
.mk__footer {
font-size: 7px !important;
padding-top: 0 !important;
padding-bottom: 4px !important;
}
}
@media (prefers-reduced-motion: reduce) {
.mk.is-demo .d1,
.mk.is-demo .d2,
.mk.is-demo .mk__code {
animation: none !important;
transform: none;
opacity: 1;
}
}var mk = document.getElementById('mk');
var copybtn = document.getElementById('copybtn');
var live = document.getElementById('live');
copybtn.addEventListener('click', function () {
mk.classList.remove('is-demo');
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText('GODRICH-9K2F').then(function () {
copybtn.textContent = '복사됨';
live.textContent = '코드를 복사했어요';
}, function () {
live.textContent = '복사 실패 — 코드를 직접 선택하세요';
});
}
});import { useState } from "react";
import styles from "./ReferralInvite.module.scss";
export type ReferralInviteProps = { duration?: number; easing?: string; color?: string };
export default function ReferralInvite({ duration = 300, easing = "cubic-bezier(.2,1.4,.4,1)", color = "#b9a0ff" }: ReferralInviteProps) {
const [demo, setDemo] = useState(true);
const [copied, setCopied] = useState(false);
const [live, setLive] = useState("");
const copyCode = () => {
setDemo(false);
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText("GODRICH-9K2F").then(
() => { setCopied(true); setLive("코드를 복사했어요"); },
() => { setLive("복사 실패 — 코드를 직접 선택하세요"); }
);
}
};
return (
<main className={styles.stage}>
<div className={styles.mk}>
<div className={styles.card}>
<div className={styles.brand}>◆ Acme</div>
<div className={styles.hero}>
<span className={styles.badge} style={{ background: color }} aria-hidden="true">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" className={styles.ico}><path d="M168,144a40,40,0,1,1-40-40A40,40,0,0,1,168,144ZM64,56A32,32,0,1,0,96,88,32,32,0,0,0,64,56Zm128,0a32,32,0,1,0,32,32A32,32,0,0,0,192,56Z" opacity="0.2"/><path d="M244.8,150.4a8,8,0,0,1-11.2-1.6A51.6,51.6,0,0,0,192,128a8,8,0,0,1,0-16,24,24,0,1,0-23.24-30,8,8,0,1,1-15.5-4A40,40,0,1,1,219,117.51a67.94,67.94,0,0,1,27.43,21.68A8,8,0,0,1,244.8,150.4ZM190.92,212a8,8,0,1,1-13.85,8,57,57,0,0,0-98.15,0,8,8,0,1,1-13.84-8,72.06,72.06,0,0,1,33.74-29.92,48,48,0,1,1,58.36,0A72.06,72.06,0,0,1,190.92,212ZM128,176a32,32,0,1,0-32-32A32,32,0,0,0,128,176ZM72,120a8,8,0,0,0-8-8A24,24,0,1,1,87.24,82a8,8,0,1,0,15.5-4A40,40,0,1,0,37,117.51,67.94,67.94,0,0,0,9.6,139.19a8,8,0,1,0,12.8,9.61A51.6,51.6,0,0,1,64,128,8,8,0,0,0,72,120Z"/></svg>
</span>
</div>
<div className={styles.title}>친구를 초대하면 둘 다 10,000원</div>
<div className={styles.body}>아래 코드로 친구가 가입하면, 두 분 모두 쿠폰을 드려요.</div>
<div className={styles.coderow}>
<span className={styles.code} style={demo ? { animationName: "rfPill", animationDuration: "2s", animationTimingFunction: easing, animationIterationCount: "infinite" } : undefined}>GODRICH-9K2F</span>
<button type="button" className={styles.copy} style={{ background: color }} aria-label="추천 코드 복사" onClick={copyCode}>{copied ? "복사됨" : "복사"}</button>
</div>
<div className={styles.dotsrow}>
<div className={styles.dots} role="img" aria-label="초대 3칸 중 2칸 완료">
{[0, 1, 2].map((i) => (
<span
key={i}
className={`${styles.dot} ${i < 2 ? styles.dotFill : ""} ${demo && i === 0 ? styles.d1 : ""} ${demo && i === 1 ? styles.d2 : ""}`}
style={demo && i < 2 ? { animationName: "rfDot", animationDuration: "2s", animationTimingFunction: easing, animationIterationCount: "infinite", animationDelay: `${i === 0 ? 160 : 380}ms`, animationFillMode: "backwards" } : undefined}
></span>
))}
</div>
<span className={styles.dotslabel}>2 / 3 초대 완료 — 한 명 더!</span>
</div>
<div className={styles.ctawrap}>
<a href="#" role="button" className={styles.cta} onClick={(e: { preventDefault: () => void }) => { e.preventDefault(); }}>친구 초대하기</a>
</div>
<div className={styles.live} aria-live="polite">{live}</div>
<div className={styles.footer}>Acme Inc · 서울 · <a href="#" className={styles.unsub}>수신거부</a></div>
</div>
</div>
</main>
);
}09 친구 추천 코드 메일 — 측정 누적면적 3.049% · 움직인 프레임 11/23GODRICH 원작 · zip 에 SCSS·React 포함 · 뉴스레터 디자인 9종 — 메일 앱에서 안 깨지는 HTML
이 데모가 속한 글
뉴스레터 디자인 9종 — 메일 앱에서 안 깨지는 HTML뉴스레터 디자인은 정기적으로 오는 마케팅 메일의 겉모습을 짜는 일입니다. 여기 아홉 가지는 다이제스트·쿠폰·타임세일·장바구니 리마인드 같은 자주 보내는 마케팅 메일을 HTML 과 CSS 로 짜 둔 것이라, 메일 앱에 이 글의 데모 전부 보기


