02ステータスバーナビ
ナビ全体がHUDのステータスバーのようにブラケットで囲まれ、アクティブなタブの下の線がスキャンするようにタブの間を滑って移動します。
使いどころLP上部バー・ダッシュボードナビ
스캔 밑줄 이동브래킷 프레임깜빡이는 상태 점

<main class="stage">
<nav class="navhud is-demo" aria-label="SENTRY">
<span class="navhud__brand">SENTRY</span>
<ul class="navhud__track">
<li class="navhud__item">ホーム</li>
<li class="navhud__item">機能</li>
<li class="navhud__item">料金</li>
<li class="navhud__item">お問い合わせ</li>
<span class="navhud__indicator" aria-hidden="true"></span>
</ul>
<span class="navhud__status"><span class="navhud__dot" aria-hidden="true"></span>LIVE</span>
</nav>
</main>@use "../../../../site/static/demo-tokens" as *;
$duration: $dur-loop; // 밑줄 인디케이터가 탭 4곳을 도는 한 주기
$easing: $ease-spring; // 인디케이터가 미끄러지는 곡선
$color: $stage-yellow; // 호박색 터미널 강조색
@include stage($stage-yellow);
.navhud {
position: relative;
box-sizing: border-box;
display: flex;
align-items: center;
gap: $sp-3;
width: clamp(260px, 84vw, 420px);
padding: $sp-2 $sp-3;
border-radius: $r-control;
background: $subject-ink;
box-shadow: 0 0 0 1px rgba($color, .4), 0 0 24px rgba($color, .16);
}
.navhud__brand {
flex: none;
color: $subject-cream;
font-weight: 800;
font-size: clamp(12px, 3vw, 13px);
line-height: 1;
font-family: inherit;
letter-spacing: .04em;
white-space: nowrap;
}
.navhud__track {
position: relative;
flex: 1 1 auto;
min-width: 0;
display: grid;
grid-template-columns: repeat(4, 1fr);
margin: 0;
padding: 0;
list-style: none;
}
.navhud__item {
padding: $sp-1 0;
color: rgba($subject-cream, .55);
font-weight: 600;
font-size: clamp(10px, 2.6vw, 11px);
line-height: 1;
font-family: inherit;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.navhud__indicator {
position: absolute;
left: 0;
bottom: 0;
width: 25%;
height: 2px;
background: $color;
animation: navScan $duration $easing infinite;
}
@keyframes navScan {
0%, 20% { transform: translateX(0); }
25%, 45% { transform: translateX(100%); }
50%, 70% { transform: translateX(200%); }
75%, 95% { transform: translateX(300%); }
100% { transform: translateX(0); }
}
.navhud__status {
flex: none;
display: flex;
align-items: center;
gap: $sp-1;
color: $color;
font-family: "Courier New", monospace;
font-weight: 700;
font-size: clamp(9px, 2.2vw, 10px);
line-height: 1;
letter-spacing: .08em;
white-space: nowrap;
}
.navhud__dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: $color;
animation: blink $dur-loop steps(1) infinite;
}
@keyframes blink {
0%, 49% { opacity: 1; }
50%, 100% { opacity: .2; }
}
@media (prefers-reduced-motion: reduce) {
.navhud__indicator, .navhud__dot {
animation: none !important;
}
.navhud__indicator { transform: translateX(0); }
.navhud__dot { opacity: 1; }
}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);
}
.navhud {
position: relative;
box-sizing: border-box;
display: flex;
align-items: center;
gap: 12px;
width: clamp(260px, 84vw, 420px);
padding: 8px 12px;
border-radius: 12px;
background: #17141a;
box-shadow: 0 0 0 1px rgba(255, 210, 63, 0.4), 0 0 24px rgba(255, 210, 63, 0.16);
}
.navhud__brand {
flex: none;
color: #fff7e6;
font-weight: 800;
font-size: clamp(12px, 3vw, 13px);
line-height: 1;
font-family: inherit;
letter-spacing: 0.04em;
white-space: nowrap;
}
.navhud__track {
position: relative;
flex: 1 1 auto;
min-width: 0;
display: grid;
grid-template-columns: repeat(4, 1fr);
margin: 0;
padding: 0;
list-style: none;
}
.navhud__item {
padding: 4px 0;
color: rgba(255, 247, 230, 0.55);
font-weight: 600;
font-size: clamp(10px, 2.6vw, 11px);
line-height: 1;
font-family: inherit;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.navhud__indicator {
position: absolute;
left: 0;
bottom: 0;
width: 25%;
height: 2px;
background: #ffd23f;
animation: navScan 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}
@keyframes navScan {
0%, 20% {
transform: translateX(0);
}
25%, 45% {
transform: translateX(100%);
}
50%, 70% {
transform: translateX(200%);
}
75%, 95% {
transform: translateX(300%);
}
100% {
transform: translateX(0);
}
}
.navhud__status {
flex: none;
display: flex;
align-items: center;
gap: 4px;
color: #ffd23f;
font-family: "Courier New", monospace;
font-weight: 700;
font-size: clamp(9px, 2.2vw, 10px);
line-height: 1;
letter-spacing: 0.08em;
white-space: nowrap;
}
.navhud__dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: #ffd23f;
animation: blink 2s steps(1) infinite;
}
@keyframes blink {
0%, 49% {
opacity: 1;
}
50%, 100% {
opacity: 0.2;
}
}
@media (prefers-reduced-motion: reduce) {
.navhud__indicator, .navhud__dot {
animation: none !important;
}
.navhud__indicator {
transform: translateX(0);
}
.navhud__dot {
opacity: 1;
}
}import type { CSSProperties } from "react";
import styles from "./NavHud.module.scss";
export type NavHudProps = {
brand?: string;
links?: string[];
status?: string;
duration?: number;
easing?: string;
color?: string;
};
type Vars = CSSProperties & { "--duration"?: string; "--easing"?: string; "--color"?: string };
export default function NavHud({
brand = "SENTRY",
links = ["홈", "기능", "요금", "문의"],
status = "LIVE",
duration = 2000,
easing = "cubic-bezier(.2,.8,.2,1)",
color = "#ffd23f",
}: NavHudProps) {
const vars: Vars = { "--duration": `${duration}ms`, "--easing": easing, "--color": color };
return (
<nav className={styles.nav} style={vars} aria-label={brand}>
<span className={styles.brand}>{brand}</span>
<ul className={styles.track}>
{links.map((label) => (
<li key={label} className={styles.item}>{label}</li>
))}
<span className={styles.indicator} aria-hidden="true" />
</ul>
<span className={styles.status}>
<span className={styles.dot} aria-hidden="true" />
{status}
</span>
</nav>
);
}02 ステータスバーナビ — 計測 累積面積 0.389% · 動いたフレーム 7/23GODRICH オリジナル · SCSS と React は zip に同梱 · HUD デザインとは?画面に見つめ返される9パーツ
このデモが属する記事
HUD デザインとは?画面に見つめ返される9パーツHUD デザインとは、ゲームやSF映画の照準器やレーダーのように、座標や状態の数値を画面に重ねて表示し、まるで自分が見つめ返されているような印象を与えるインターフェース手法です。この記事では、その監視カメラのような雰囲気をそのまま動くランデ この記事のデモをすべて見る


