コンポーネント研究 / ヘッダー
グラスヘッダー
半透明の背景とぼかしを使った、追従するナビゲーション。
モダングラスモーフィズムミニマルサンセリフインラインレスポンシブSaaSスタートアップ
ライブプレビュー
表示幅: 1440px。画面に合わせて縮小しています。原寸での操作や長いセクションの確認には、プレビューを開いてください。
'use client';
const COLORS = {
light: {
background: 'rgba(255,255,255,0.8)',
brand: '#111111',
link: '#555555',
linkHover: '#111111',
buttonBg: '#111111',
buttonText: '#FFFFFF',
loginText: '#555555',
border: 'rgba(0,0,0,0.06)',
hamburger: '#111111',
},
dark: {
background: 'rgba(10,10,10,0.8)',
brand: '#FFFFFF',
link: '#999999',
linkHover: '#FFFFFF',
buttonBg: '#FFFFFF',
buttonText: '#000000',
loginText: '#999999',
border: 'rgba(255,255,255,0.06)',
hamburger: '#FFFFFF',
},
} as const;
interface SampleHeader1Props {
mode?: 'light' | 'dark';
brand?: string;
links?: string[];
loginText?: string;
ctaText?: string;
}
export default function SampleHeader1({
mode = 'dark',
brand = 'DesignQuest',
links = ['제품', '기능', '요금', '문서', '블로그'],
loginText = '로그인',
ctaText = '시작하기',
}: SampleHeader1Props) {
const colors = COLORS[mode];
return (
<header
className="sticky top-0 z-50 px-6 py-4 backdrop-blur-md"
style={{
backgroundColor: colors.background,
borderBottom: `1px solid ${colors.border}`,
}}
>
<div className="max-w-6xl mx-auto flex items-center justify-between">
<div className="text-xl font-bold" style={{ color: colors.brand }}>
{brand}
</div>
<nav className="hidden md:flex items-center gap-6">
{links.map((link) => (
<a
key={link}
href="#"
className="text-sm transition-colors"
style={{ color: colors.link }}
>
{link}
</a>
))}
</nav>
<div className="hidden md:flex items-center gap-3">
<a href="#" className="text-sm" style={{ color: colors.loginText }}>
{loginText}
</a>
<button
className="px-5 py-2 rounded-lg text-sm font-medium transition-opacity hover:opacity-90"
style={{ backgroundColor: colors.buttonBg, color: colors.buttonText }}
>
{ctaText}
</button>
</div>
<button className="md:hidden text-xl" style={{ color: colors.hamburger }}>
☰
</button>
</div>
</header>
);
}