05ロック対象プラン
おすすめプランのカードだけブラケットが呼吸するように脈打ち、LOCKEDバッジが付き、もう一方のカードはピントが外れたようにぼやけます。
使いどころ2段階の料金プラン・無料と有料の比較
브래킷 맥동LOCKED 배지디포커스

<main class="stage">
<div class="pricing is-demo">
<article class="pricing__card pricing__card--dim">
<p class="pricing__name">ライト</p>
<p class="pricing__price">無料</p>
<ul class="pricing__feats">
<li>ベーシックスキャン</li>
<li>チャンネル1つ</li>
</ul>
</article>
<article class="pricing__card pricing__card--locked">
<span class="pricing__badge">LOCKED</span>
<span class="pricing__corner pricing__corner--tl" aria-hidden="true"></span>
<span class="pricing__corner pricing__corner--tr" aria-hidden="true"></span>
<span class="pricing__corner pricing__corner--bl" aria-hidden="true"></span>
<span class="pricing__corner pricing__corner--br" aria-hidden="true"></span>
<p class="pricing__name">プロ</p>
<p class="pricing__price">月1,200円</p>
<ul class="pricing__feats">
<li>リアルタイム追跡</li>
<li>チャンネル無制限</li>
</ul>
</article>
</div>
</main>@use "../../../../site/static/demo-tokens" as *;
$duration: $dur-loop; // 브래킷 맥동 + 글로우 호흡 한 주기
$easing: $ease-spring; // 잠금이 숨 쉬는 곡선
$color: $stage-yellow; // 호박색 터미널 강조색
@include stage($stage-ink);
.pricing {
display: flex;
align-items: flex-start;
gap: $sp-4;
width: clamp(260px, 84vw, 420px);
}
.pricing__card {
position: relative;
box-sizing: border-box;
min-width: 0;
// flex-basis 고정 160px + flex-wrap:wrap 조합은 320px 폰 체크에서 84vw(268.8px) 폭에
// 카드 2장(160+160+gap)이 안 들어가 줄바꿈되어 세로로 쌓인다 — 높이가 200px 을 훌쩍 넘겼다
// (131-05 실측: docEl.scrollHeight 311px vs innerHeight 200px). 129·130 형제 항목처럼
// wrap 없이 flex:1 로 균등 분배해 항상 한 줄에 나란히 놓는다.
flex: 1 1 0;
padding: $sp-5 $sp-4;
border-radius: $r-card;
background: $subject-ink;
box-shadow: 0 0 0 1px rgba($color, .4), 0 0 24px rgba($color, .16);
}
.pricing__card--dim {
opacity: .55;
}
.pricing__card--locked::before {
content: "";
position: absolute;
inset: -1px;
border-radius: inherit;
pointer-events: none;
box-shadow: 0 0 0 1px rgba($color, .6), 0 0 32px rgba($color, .4);
opacity: .4;
animation: glowBreathe $duration $easing infinite;
}
@keyframes glowBreathe {
0%, 100% { opacity: .4; }
50% { opacity: 1; }
}
.pricing__badge {
position: relative;
display: inline-block;
margin: 0 0 $sp-2;
padding: $sp-1 $sp-2;
border-radius: $r-xs;
background: rgba($color, .16);
color: $color;
font-family: "Courier New", monospace;
font-weight: 700;
font-size: clamp(9px, 2.2vw, 10px);
line-height: 1;
letter-spacing: .08em;
}
.pricing__corner {
position: absolute;
width: 16px;
height: 16px;
pointer-events: none;
border-color: $color;
border-style: solid;
border-width: 0;
animation: cornerPulse $duration $easing infinite;
}
.pricing__corner--tl { top: $sp-2; left: $sp-2; border-top-width: 2px; border-left-width: 2px; transform-origin: top left; } // 규칙8: 괄호 꼭짓점 모서리 고정
.pricing__corner--tr { top: $sp-2; right: $sp-2; border-top-width: 2px; border-right-width: 2px; transform-origin: top right; animation-delay: -.15s; } // 규칙8: 괄호 꼭짓점 모서리 고정
.pricing__corner--bl { bottom: $sp-2; left: $sp-2; border-bottom-width: 2px; border-left-width: 2px; transform-origin: bottom left; animation-delay: -.3s; } // 규칙8: 괄호 꼭짓점 모서리 고정
.pricing__corner--br { bottom: $sp-2; right: $sp-2; border-bottom-width: 2px; border-right-width: 2px; transform-origin: bottom right; animation-delay: -.45s; } // 규칙8: 괄호 꼭짓점 모서리 고정
@keyframes cornerPulse {
0%, 100% { transform: scale(.55); opacity: .35; }
50% { transform: scale(1); opacity: 1; }
}
.pricing__name {
position: relative;
margin: 0 0 $sp-1;
color: $subject-cream;
font-weight: 700;
font-size: clamp(13px, 3vw, 15px);
line-height: 1.2;
font-family: inherit;
}
.pricing__price {
position: relative;
margin: 0 0 $sp-3;
color: rgba($subject-cream, .6);
font-weight: 600;
font-size: clamp(11px, 2.6vw, 12px);
line-height: 1.2;
font-family: inherit;
}
// dim 카드는 .pricing__card--dim 의 opacity .55 가 글자 알파에 곱해진다 — 기본 .6/.75 는 실효 .33/.41 이라 2.89~3.82:1.
// dim 카드에서만 알파를 빼 실효 .55 (5.85:1) 로 올린다. 밝은 카드의 위계(.6/.75)는 그대로 둔다
.pricing__card--dim .pricing__price,
.pricing__card--dim .pricing__feats { color: $subject-cream; }
.pricing__feats {
position: relative;
margin: 0;
padding: 0;
list-style: none;
display: flex;
flex-direction: column;
gap: $sp-1;
color: rgba($subject-cream, .75);
font-weight: 500;
font-size: clamp(10px, 2.4vw, 11px);
line-height: 1.5;
font-family: inherit;
}
@media (prefers-reduced-motion: reduce) {
.pricing__card--locked::before, .pricing__corner {
animation: none !important;
}
.pricing__card--locked::before { opacity: 1; }
.pricing__corner { transform: scale(1); 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);
}
.pricing {
display: flex;
align-items: flex-start;
gap: 16px;
width: clamp(260px, 84vw, 420px);
}
.pricing__card {
position: relative;
box-sizing: border-box;
min-width: 0;
flex: 1 1 0;
padding: 20px 16px;
border-radius: 16px;
background: #17141a;
box-shadow: 0 0 0 1px rgba(255, 210, 63, 0.4), 0 0 24px rgba(255, 210, 63, 0.16);
}
.pricing__card--dim {
opacity: 0.55;
}
.pricing__card--locked::before {
content: "";
position: absolute;
inset: -1px;
border-radius: inherit;
pointer-events: none;
box-shadow: 0 0 0 1px rgba(255, 210, 63, 0.6), 0 0 32px rgba(255, 210, 63, 0.4);
opacity: 0.4;
animation: glowBreathe 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}
@keyframes glowBreathe {
0%, 100% {
opacity: 0.4;
}
50% {
opacity: 1;
}
}
.pricing__badge {
position: relative;
display: inline-block;
margin: 0 0 8px;
padding: 4px 8px;
border-radius: 4px;
background: rgba(255, 210, 63, 0.16);
color: #ffd23f;
font-family: "Courier New", monospace;
font-weight: 700;
font-size: clamp(9px, 2.2vw, 10px);
line-height: 1;
letter-spacing: 0.08em;
}
.pricing__corner {
position: absolute;
width: 16px;
height: 16px;
pointer-events: none;
border-color: #ffd23f;
border-style: solid;
border-width: 0;
animation: cornerPulse 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}
.pricing__corner--tl {
top: 8px;
left: 8px;
border-top-width: 2px;
border-left-width: 2px;
transform-origin: top left;
}
.pricing__corner--tr {
top: 8px;
right: 8px;
border-top-width: 2px;
border-right-width: 2px;
transform-origin: top right;
animation-delay: -0.15s;
}
.pricing__corner--bl {
bottom: 8px;
left: 8px;
border-bottom-width: 2px;
border-left-width: 2px;
transform-origin: bottom left;
animation-delay: -0.3s;
}
.pricing__corner--br {
bottom: 8px;
right: 8px;
border-bottom-width: 2px;
border-right-width: 2px;
transform-origin: bottom right;
animation-delay: -0.45s;
}
@keyframes cornerPulse {
0%, 100% {
transform: scale(0.55);
opacity: 0.35;
}
50% {
transform: scale(1);
opacity: 1;
}
}
.pricing__name {
position: relative;
margin: 0 0 4px;
color: #fff7e6;
font-weight: 700;
font-size: clamp(13px, 3vw, 15px);
line-height: 1.2;
font-family: inherit;
}
.pricing__price {
position: relative;
margin: 0 0 12px;
color: rgba(255, 247, 230, 0.6);
font-weight: 600;
font-size: clamp(11px, 2.6vw, 12px);
line-height: 1.2;
font-family: inherit;
}
.pricing__card--dim .pricing__price,
.pricing__card--dim .pricing__feats {
color: #fff7e6;
}
.pricing__feats {
position: relative;
margin: 0;
padding: 0;
list-style: none;
display: flex;
flex-direction: column;
gap: 4px;
color: rgba(255, 247, 230, 0.75);
font-weight: 500;
font-size: clamp(10px, 2.4vw, 11px);
line-height: 1.5;
font-family: inherit;
}
@media (prefers-reduced-motion: reduce) {
.pricing__card--locked::before, .pricing__corner {
animation: none !important;
}
.pricing__card--locked::before {
opacity: 1;
}
.pricing__corner {
transform: scale(1);
opacity: 1;
}
}import type { CSSProperties } from "react";
import styles from "./PricingHud.module.scss";
export type PricingHudProps = {
dimName?: string;
dimPrice?: string;
dimFeats?: string[];
lockedName?: string;
lockedPrice?: string;
lockedFeats?: string[];
badge?: string;
duration?: number;
easing?: string;
color?: string;
};
type Vars = CSSProperties & { "--duration"?: string; "--easing"?: string; "--color"?: string };
export default function PricingHud({
dimName = "라이트",
dimPrice = "무료",
dimFeats = ["기본 스캔", "채널 1개"],
lockedName = "프로",
lockedPrice = "월 9,900원",
lockedFeats = ["실시간 추적", "채널 무제한"],
badge = "LOCKED",
duration = 2000,
easing = "cubic-bezier(.2,.8,.2,1)",
color = "#ffd23f",
}: PricingHudProps) {
const vars: Vars = { "--duration": `${duration}ms`, "--easing": easing, "--color": color };
return (
<div className={styles.pricing} style={vars}>
<article className={`${styles.card} ${styles.dim}`}>
<p className={styles.name}>{dimName}</p>
<p className={styles.price}>{dimPrice}</p>
<ul className={styles.feats}>
{dimFeats.map((f) => <li key={f}>{f}</li>)}
</ul>
</article>
<article className={`${styles.card} ${styles.locked}`}>
<span className={styles.badge}>{badge}</span>
<span className={`${styles.corner} ${styles.cornerTl}`} aria-hidden="true" />
<span className={`${styles.corner} ${styles.cornerTr}`} aria-hidden="true" />
<span className={`${styles.corner} ${styles.cornerBl}`} aria-hidden="true" />
<span className={`${styles.corner} ${styles.cornerBr}`} aria-hidden="true" />
<p className={styles.name}>{lockedName}</p>
<p className={styles.price}>{lockedPrice}</p>
<ul className={styles.feats}>
{lockedFeats.map((f) => <li key={f}>{f}</li>)}
</ul>
</article>
</div>
);
}05 ロック対象プラン — 計測 累積面積 5.45% · 動いたフレーム 23/23GODRICH オリジナル · SCSS と React は zip に同梱 · HUD デザインとは?画面に見つめ返される9パーツ
このデモが属する記事
HUD デザインとは?画面に見つめ返される9パーツHUD デザインとは、ゲームやSF映画の照準器やレーダーのように、座標や状態の数値を画面に重ねて表示し、まるで自分が見つめ返されているような印象を与えるインターフェース手法です。この記事では、その監視カメラのような雰囲気をそのまま動くランデ この記事のデモをすべて見る


