07星評価アンケートメール
星5つが左から順に埋まって4つ目で止まり、その下にお礼の一行が上がってきて、回答がメール内で完結します。
使いどころ購入後の満足度調査、NPS収集メール
role=radiogroupanimation-delay:focus-visible

<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__title">先週のお買い物はいかがでしたか?</td></tr>
<tr><td align="center" class="mk__body">星を押すと回答が記録されます。10秒で終わります。</td></tr>
<tr><td align="center" class="mk__starsrow">
<div class="mk__stars" role="radiogroup" aria-label="5点満点の評価" id="stars">
<button type="button" class="mk__star" role="radio" aria-checked="false" aria-label="星1"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" class="mk__ico"><path d="M229.06,108.79l-48.7,42,14.88,62.79a8.4,8.4,0,0,1-12.52,9.17L128,189.09,73.28,222.74a8.4,8.4,0,0,1-12.52-9.17l14.88-62.79-48.7-42A8.46,8.46,0,0,1,31.73,94L95.64,88.8l24.62-59.6a8.36,8.36,0,0,1,15.48,0l24.62,59.6L224.27,94A8.46,8.46,0,0,1,229.06,108.79Z" opacity="0.2"/><path d="M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"/></svg></button>
<button type="button" class="mk__star" role="radio" aria-checked="false" aria-label="星2"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" class="mk__ico"><path d="M229.06,108.79l-48.7,42,14.88,62.79a8.4,8.4,0,0,1-12.52,9.17L128,189.09,73.28,222.74a8.4,8.4,0,0,1-12.52-9.17l14.88-62.79-48.7-42A8.46,8.46,0,0,1,31.73,94L95.64,88.8l24.62-59.6a8.36,8.36,0,0,1,15.48,0l24.62,59.6L224.27,94A8.46,8.46,0,0,1,229.06,108.79Z" opacity="0.2"/><path d="M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"/></svg></button>
<button type="button" class="mk__star" role="radio" aria-checked="false" aria-label="星3"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" class="mk__ico"><path d="M229.06,108.79l-48.7,42,14.88,62.79a8.4,8.4,0,0,1-12.52,9.17L128,189.09,73.28,222.74a8.4,8.4,0,0,1-12.52-9.17l14.88-62.79-48.7-42A8.46,8.46,0,0,1,31.73,94L95.64,88.8l24.62-59.6a8.36,8.36,0,0,1,15.48,0l24.62,59.6L224.27,94A8.46,8.46,0,0,1,229.06,108.79Z" opacity="0.2"/><path d="M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"/></svg></button>
<button type="button" class="mk__star" role="radio" aria-checked="false" aria-label="星4"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" class="mk__ico"><path d="M229.06,108.79l-48.7,42,14.88,62.79a8.4,8.4,0,0,1-12.52,9.17L128,189.09,73.28,222.74a8.4,8.4,0,0,1-12.52-9.17l14.88-62.79-48.7-42A8.46,8.46,0,0,1,31.73,94L95.64,88.8l24.62-59.6a8.36,8.36,0,0,1,15.48,0l24.62,59.6L224.27,94A8.46,8.46,0,0,1,229.06,108.79Z" opacity="0.2"/><path d="M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"/></svg></button>
<button type="button" class="mk__star" role="radio" aria-checked="false" aria-label="星5"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" class="mk__ico"><path d="M229.06,108.79l-48.7,42,14.88,62.79a8.4,8.4,0,0,1-12.52,9.17L128,189.09,73.28,222.74a8.4,8.4,0,0,1-12.52-9.17l14.88-62.79-48.7-42A8.46,8.46,0,0,1,31.73,94L95.64,88.8l24.62-59.6a8.36,8.36,0,0,1,15.48,0l24.62,59.6L224.27,94A8.46,8.46,0,0,1,229.06,108.79Z" opacity="0.2"/><path d="M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"/></svg></button>
</div>
</td></tr>
<tr><td align="center" class="mk__thanks"><span class="mk__thankline" id="thankline">ありがとうございます!他のお話があれば返信で聞かせてください。</span></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-quick;
$easing: $ease-out;
$color: $stage-orange;
@include stage($stage-orange);
.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__title { font-weight: 800; font-size: clamp(12px, 3.6vw, 14px); line-height: 1.25; color: $subject-ink; padding-top: $sp-2 !important; }
.mk__body { font-weight: 500; font-size: clamp(9px, 2.8vw, 10px); line-height: 1.4; color: rgba(23,20,26,.62); padding-top: 0 !important; padding-bottom: $sp-1 !important; }
.mk__starsrow { padding-top: 0 !important; padding-bottom: 0 !important; }
.mk__stars { display: inline-flex; gap: $sp-1; }
.mk__star {
display: inline-flex; align-items: center; justify-content: center;
width: clamp(28px, 9vw, 38px); height: clamp(28px, 9vw, 38px);
background: none; border: none; cursor: pointer; padding: 0; font-family: inherit;
color: rgba(23,20,26,.22);
}
.mk__ico { width: 100%; height: 100%; }
.mk__star.is-fill { color: $stage-orange; }
.mk__star:hover { color: rgba(23,20,26,.4); }
.mk__star.is-fill:hover { color: $stage-orange; }
.mk__star:focus-visible { outline: 2px solid $subject-ink; outline-offset: 2px; border-radius: $r-xs; }
.mk__thanks { padding-top: $sp-1 !important; padding-bottom: 0 !important; min-height: 28px; }
.mk__thankline { font-weight: 600; font-size: clamp(9px, 2.8vw, 10px); line-height: 1.4; color: rgba(23,20,26,.62); }
.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 주기, 복귀 86%)
.mk.is-demo .mk__star:nth-child(1) { animation-name: svFill; animation-duration: 2s; animation-timing-function: steps(1, end); animation-iteration-count: infinite; animation-delay: 120ms; }
.mk.is-demo .mk__star:nth-child(2) { animation-name: svFill; animation-duration: 2s; animation-timing-function: steps(1, end); animation-iteration-count: infinite; animation-delay: 280ms; }
.mk.is-demo .mk__star:nth-child(3) { animation-name: svFill; animation-duration: 2s; animation-timing-function: steps(1, end); animation-iteration-count: infinite; animation-delay: 440ms; }
.mk.is-demo .mk__star:nth-child(4) { animation-name: svFill; animation-duration: 2s; animation-timing-function: steps(1, end); animation-iteration-count: infinite; animation-delay: 600ms; }
.mk.is-demo .mk__star:nth-child(5) { animation-name: svPop; animation-duration: 2s; animation-timing-function: $ease-pop; animation-iteration-count: infinite; }
.mk.is-demo .mk__thankline { animation-name: svThanks; animation-duration: 2s; animation-timing-function: $ease-out; animation-iteration-count: infinite; }
@keyframes svFill {
0% { color: rgba(23,20,26,.22); }
30%, 84% { color: $stage-orange; }
86%, 100% { color: rgba(23,20,26,.22); }
}
@keyframes svPop {
0%, 56% { transform: scale(1); }
62% { transform: scale(1.14); }
70%, 100% { transform: scale(1); }
}
@keyframes svThanks {
0%, 58% { opacity: 0; transform: translateY(6px); }
72% { opacity: 1; transform: translateY(0); }
84% { opacity: 1; transform: translateY(0); }
90%, 100% { opacity: 0; transform: translateY(6px); }
}
// ── 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__title { font-size: 11px !important; padding-top: $sp-1 !important; }
.mk__body { font-size: 8px !important; padding-bottom: 0 !important; }
.mk__star { width: 24px; height: 24px; }
.mk__thanks { min-height: 0; padding-top: 0 !important; }
.mk__thankline { 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 .mk__star,
.mk.is-demo .mk__thankline { animation: none !important; }
}html, body {
margin: 0;
overflow: hidden;
}
.stage {
box-sizing: border-box;
min-height: 100vh;
display: grid;
place-items: center;
margin: 0;
background: #ff4d1f;
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__title {
font-weight: 800;
font-size: clamp(12px, 3.6vw, 14px);
line-height: 1.25;
color: #17141a;
padding-top: 8px !important;
}
.mk__body {
font-weight: 500;
font-size: clamp(9px, 2.8vw, 10px);
line-height: 1.4;
color: rgba(23, 20, 26, 0.62);
padding-top: 0 !important;
padding-bottom: 4px !important;
}
.mk__starsrow {
padding-top: 0 !important;
padding-bottom: 0 !important;
}
.mk__stars {
display: inline-flex;
gap: 4px;
}
.mk__star {
display: inline-flex;
align-items: center;
justify-content: center;
width: clamp(28px, 9vw, 38px);
height: clamp(28px, 9vw, 38px);
background: none;
border: none;
cursor: pointer;
padding: 0;
font-family: inherit;
color: rgba(23, 20, 26, 0.22);
}
.mk__ico {
width: 100%;
height: 100%;
}
.mk__star.is-fill {
color: #ff4d1f;
}
.mk__star:hover {
color: rgba(23, 20, 26, 0.4);
}
.mk__star.is-fill:hover {
color: #ff4d1f;
}
.mk__star:focus-visible {
outline: 2px solid #17141a;
outline-offset: 2px;
border-radius: 4px;
}
.mk__thanks {
padding-top: 4px !important;
padding-bottom: 0 !important;
min-height: 28px;
}
.mk__thankline {
font-weight: 600;
font-size: clamp(9px, 2.8vw, 10px);
line-height: 1.4;
color: rgba(23, 20, 26, 0.62);
}
.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 .mk__star:nth-child(1) {
animation-name: svFill;
animation-duration: 2s;
animation-timing-function: steps(1, end);
animation-iteration-count: infinite;
animation-delay: 120ms;
}
.mk.is-demo .mk__star:nth-child(2) {
animation-name: svFill;
animation-duration: 2s;
animation-timing-function: steps(1, end);
animation-iteration-count: infinite;
animation-delay: 280ms;
}
.mk.is-demo .mk__star:nth-child(3) {
animation-name: svFill;
animation-duration: 2s;
animation-timing-function: steps(1, end);
animation-iteration-count: infinite;
animation-delay: 440ms;
}
.mk.is-demo .mk__star:nth-child(4) {
animation-name: svFill;
animation-duration: 2s;
animation-timing-function: steps(1, end);
animation-iteration-count: infinite;
animation-delay: 600ms;
}
.mk.is-demo .mk__star:nth-child(5) {
animation-name: svPop;
animation-duration: 2s;
animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
animation-iteration-count: infinite;
}
.mk.is-demo .mk__thankline {
animation-name: svThanks;
animation-duration: 2s;
animation-timing-function: ease-out;
animation-iteration-count: infinite;
}
@keyframes svFill {
0% {
color: rgba(23, 20, 26, 0.22);
}
30%, 84% {
color: #ff4d1f;
}
86%, 100% {
color: rgba(23, 20, 26, 0.22);
}
}
@keyframes svPop {
0%, 56% {
transform: scale(1);
}
62% {
transform: scale(1.14);
}
70%, 100% {
transform: scale(1);
}
}
@keyframes svThanks {
0%, 58% {
opacity: 0;
transform: translateY(6px);
}
72% {
opacity: 1;
transform: translateY(0);
}
84% {
opacity: 1;
transform: translateY(0);
}
90%, 100% {
opacity: 0;
transform: translateY(6px);
}
}
@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__title {
font-size: 11px !important;
padding-top: 4px !important;
}
.mk__body {
font-size: 8px !important;
padding-bottom: 0 !important;
}
.mk__star {
width: 24px;
height: 24px;
}
.mk__thanks {
min-height: 0;
padding-top: 0 !important;
}
.mk__thankline {
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 .mk__star,
.mk.is-demo .mk__thankline {
animation: none !important;
}
}var mk = document.getElementById('mk');
var stars = document.querySelectorAll('.mk__star');
var thankline = document.getElementById('thankline');
for (var i = 0; i < stars.length; i++) {
stars[i].addEventListener('click', function () {
mk.classList.remove('is-demo');
var idx = Array.prototype.indexOf.call(stars, this);
for (var j = 0; j < stars.length; j++) {
stars[j].classList.toggle('is-fill', j <= idx);
stars[j].setAttribute('aria-checked', String(j === idx));
}
thankline.textContent = (idx + 1) + 'をつけてくれましたね、ありがとうございます。';
});
}import { useState } from "react";
import styles from "./StarSurvey.module.scss";
export type StarSurveyProps = { duration?: number; easing?: string; color?: string };
function StarIcon() {
return (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" className={styles.ico}>
<path d="M229.06,108.79l-48.7,42,14.88,62.79a8.4,8.4,0,0,1-12.52,9.17L128,189.09,73.28,222.74a8.4,8.4,0,0,1-12.52-9.17l14.88-62.79-48.7-42A8.46,8.46,0,0,1,31.73,94L95.64,88.8l24.62-59.6a8.36,8.36,0,0,1,15.48,0l24.62,59.6L224.27,94A8.46,8.46,0,0,1,229.06,108.79Z" opacity="0.2" />
<path d="M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z" />
</svg>
);
}
export default function StarSurvey({ duration = 220, easing = "ease-out", color = "#ff4d1f" }: StarSurveyProps) {
const [demo, setDemo] = useState(true);
const [rating, setRating] = useState(0);
return (
<main className={styles.stage}>
<div className={styles.mk}>
<div className={styles.card}>
<div className={styles.brand}>◆ Acme</div>
<div className={styles.title}>지난 주 쇼핑은 어땠나요?</div>
<div className={styles.body}>별을 누르면 답변이 기록돼요. 10초면 끝나요.</div>
<div className={styles.starsrow}>
<div className={styles.stars} role="radiogroup" aria-label="별점 5점 만점">
{[1, 2, 3, 4, 5].map((n) => (
<button
key={n}
type="button"
className={`${styles.star} ${n <= rating ? styles.isFill : ""}`}
style={{
color: n <= rating ? color : undefined,
...(demo ? { animationName: n < 5 ? "svFill" : "svPop", animationDuration: "2s", animationTimingFunction: n < 5 ? "steps(1, end)" : easing, animationIterationCount: "infinite", animationDelay: `${[120, 280, 440, 600, 0][n - 1]}ms` } : {}),
}}
role="radio"
aria-checked={rating === n}
aria-label={`${n}점`}
onClick={() => { setDemo(false); setRating((r) => (r === n ? 0 : n)); }}
>
<StarIcon />
</button>
))}
</div>
</div>
<div className={styles.thanks}>
<span className={styles.thankline} style={demo ? { animationName: "svThanks", animationDuration: "2s", animationTimingFunction: easing, animationIterationCount: "infinite" } : undefined}>
{rating > 0 ? `${rating}점을 주셨네요, 감사합니다.` : "감사해요! 다른 이야기가 있으면 답장으로 들려주세요."}
</span>
</div>
<div className={styles.footer}>Acme Inc · 서울 · <a href="#" className={styles.unsub}>수신거부</a></div>
</div>
</div>
</main>
);
}07 星評価アンケートメール — 計測 累積面積 2.924% · 動いたフレーム 10/23GODRICH オリジナル · SCSS と React は zip に同梱 · メルマガ デザイン 9種 — Outlookでも崩れない
このデモが属する記事
メルマガ デザイン 9種 — Outlookでも崩れないメルマガ デザインとは、売るために送るメール — ニュースレター、クーポン、タイムセール、リマインド — の見た目を組み立てる仕事です。この9つはテーブル(table)の縦罫を骨組みにしたHTMLとCSSだけで作ってあり、Outlookでも この記事のデモをすべて見る


