Communitygithub.com

スティッキーヘッダー&トップバーシステム

アナウンスバー、ユーティリティヘッダー、プライマリナビゲーションなど、スティッキーおよび固定トップバーシステムの設計、構造化、最適化を行います。スクロールに応じた縮小表示、動的な表示/非表示、サーフェスの高度変化、WCAG AAアクセシビリティ準拠に対応します。

スティッキーヘッダー&トップバーシステム とは?

このスキルは、最新のWebアプリケーションやマーケティングサイトで一般的に使用される、多階層のトップバーシステム(アナウンスバナー、ユーティリティリンク、プライマリナビゲーション)を設計・実装するための包括的なフレームワークを提供します。主な機能として、`position: sticky` と `position: fixed` を使い分けた固定メカニズム、スクロール量に応じてヘッダーを縮小・隠蔽・再表示するスマートスクロール動作、モバイルビューポート制約に適応するレスポンシブ設計、そして `backdrop-filter` を用いたガラスモーフィックなサーフェス表現などが含まれます。また、WCAG 2.1 AAに準拠するため、スキップリンク、`scroll-margin-top` によるアンカーオフセット、キーボードナビゲーション、`prefers-reduced-motion` への対応など、アクセシビリティに関する詳細な設計ガイドラインを提供します。このスキルは、Claude Code、Cursor、CodexなどのAIエージェントプラットフォームで使用することを想定しており、開発者はこれらの指示に従うことで、ユーザー体験を損なわない、堅牢でアクセシブルなスティッキーヘッダーを効率的に実装できます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/coastdigitalgroup/coastai-skills/tree/HEAD/website-design/sticky-header-and-top-bar-system

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

スティッキーヘッダー & トップバーシステム

目的

スティッキーヘッダー & トップバーシステムは、画面上部に固定されるナビゲーションスタックを設計、構造化、動作設定するための包括的なフレームワークを提供します。現代のWebアプリケーションやマーケティングサイトでは、プロモーション用のアナウンスバナー、セカンダリユーティリティリンク(通貨/言語セレクター、サポートリンク、ストアロケーター)、プライマリナビゲーションバーを組み合わせた多層トップバーが頻繁に使用されます。

これらのバーがスクロール中に固定またはスティッキーになる場合、アーキテクチャが不適切だと、モバイルで垂直ビューポートスペースを過剰に消費する、アンカータゲットコンテンツが隠れる(scroll-margin-topの不一致)、スクロール状態変化時にレイアウトスラッシングやスタッターが発生する、モーダルやドロップダウンとのz-index競合が生じる、キーボードフォーカスがトラップされる、スクリーンリーダーのランドマークナビゲーションが機能しなくなる、といった深刻なユーザビリティ問題を引き起こします。このスキルは、スティッキーヘッダーの設計、空間構成、スクロール状態ロジック、エレベーションスタイリング、アクセシビリティ基準を確立します。

ユースケース

  • Eコマースグローバルヘッダー: トップアナウンスバナー(プロモコード/送料無料進捗)、ユーティリティリンク(アカウントログイン、地域セレクター、ストアロケーター)、検索バーとカート数バッジを備えたメインスティッキーナビゲーションを組み合わせた多層トップバー。
  • SaaSマーケティング & プロダクトマーケティングヘッダー: スクロール時に縮小する(パディング/ロゴサイズを削減)クリーンなプライマリヘッダー、またはスクロールダウンで非表示/スクロールアップで再表示する動的ヘッダーにより、垂直方向のコンテンツ領域を最大化しつつ、即座にナビゲーションにアクセスできるようにします。
  • コンテンツポータル & パブリケーションヘッダー: 読書進行状況バー、カテゴリナビゲーション、記事タイトル表示、クイックブックマーク/共有フローティングツールを統合したスティッキーヘッダー。
  • Webアプリケーション & SaaSアプリシェル: パンくずリスト、アクティブワークスペーススイッチャー、コマンド検索トリガー、ユーザープロファイルメニュー、リアルタイム通知ベルを含む固定トップバー。

使用すべきでないケース

  • キャンバス内フォーマッティングツールバー: リッチテキストエディタのツールバーや一括操作ドックがコンテンツ上にフロートする場合や特定のエディタコンポーネントにアタッチされる場合は、toolbar-and-action-dock-system を使用してください。
  • モバイルボトムナビゲーションバー: モバイルビューポート下部に固定されるプライマリモバイルアプタブの場合は、bottom-navigation-system を使用してください。
  • フルサイドナビゲーションシェル: プライマリナビゲーションが折りたたみ可能な左サイドバーレールによって駆動される複雑なSaaS Webアプリケーションの場合は、sidebar-navigation-system を使用してください。
  • フローティングアクションドック: ビューポートの隅に固定されるフローティングコンテキストボタン(チャットウィジェット、トップに戻るFABなど)の場合は、sticky-and-floating-ui-system を使用してください。

入力

  1. トップバー階層アーキテクチャ: 存在する階層の指定(例:階層1: アナウンスバー、階層2: ユーティリティヘッダー、階層3: プライマリナビゲーション)。
  2. スクロール動作モデル: 希望するスティッキーメカニズム(sticky-always、shrink-on-scroll、hide-on-scroll-down / reveal-on-scroll-up、または static-to-sticky)。
  3. サーフェス & テーマトークン: 背景サーフェスカラー、ボーダートークン、背景ぼかし効果(backdrop-filter: blur())、elevation-and-depth-system および accessible-color-system からのエレベーションシャドウ。
  4. ビューポート & デバイスターゲット: マルチ階層デスクトップヘッダーを統合モバイルトップバーに折りたたむためのブレークポイント閾値(< 768px、< 1024px、≥ 1024px)。

出力

  1. スティッキーヘッダーレイアウト & スタッキング仕様: 固定/スティッキーポジショニングを定義するCSS Grid/Flexbox構造、CSSカスタムプロパティオフセット変数(--header-height)、z-index階層スケール。
  2. スクロール状態遷移 & モーションルール: スクロールリスナーロジック、閾値オフセット、CSSトランジションクラス(.is-scrolled、.is-hidden)、ハードウェアアクセラレーション変換(transform: translateY())の技術仕様。
  3. レスポンシブモバイル折りたたみ仕様: 複数行のデスクトップトップバーを、ドロワートグルトリガーを備えた単一のコンパクトなモバイルヘッダーに変換するレイアウトルール。
  4. WCAG AAアクセシビリティブループリント: スキップリンクの実装(.skip-link)、見出しアンカーに対する scroll-margin-top オフセット補正、キーボードフォーカストラップ回避、スクリーンリーダーランドマーク構造(<header>、<nav>、`role=

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for progressive disclosure using accordions, ensuring structural integrity, visual affordances, and accessibility across different content densities and devices.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for long-form content, managing readability, vertical rhythm, and information density to ensure a superior reading experience.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for informational elements that communicate state (Badges) and categorization (Tags) with clarity and accessibility.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for non-overlay notifications, managing global announcements and contextual inline alerts to communicate system states without interrupting the user's flow.

coastdigitalgroup/coastai-skills

Design and implement a systematic, asymmetrical bento-grid layout framework to organize diverse content types cohesively while maintaining strict visual hierarchy, logical focus order, and responsive flexibility.

coastdigitalgroup/coastai-skills

Design a responsive, mobile-first bottom navigation bar and persistent action dock system for mobile websites and web applications, establishing spatial anchors, tab bar anatomy, badge indicators, thumb-zone ergonomics, safe area inset handling, active/inactive state contrast, and desktop responsive adaptation rules.

coastdigitalgroup/coastai-skills

Design a mobile-first bottom sheet overlay system with configurable detents, drag affordances, safe area padding, responsive desktop modal/popover adaptation, and WCAG AA accessibility compliance.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for secondary navigation trails that provide orientation, context, and one-click access to parent levels in deep information architectures.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for buttons and interactive triggers, managing visual hierarchy, variant logic, and action grouping to ensure clear intent and accessible interaction.

coastdigitalgroup/coastai-skills

Design a systematic framework for date and time selection, managing calendar grids, range pickers, and scheduling interfaces to ensure precision and accessibility.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for modular content containers that maintain hierarchy, structural integrity, and action alignment across variable content and responsive viewports.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for horizontal discovery components, managing navigation affordances, scroll behavior, and accessibility to ensure effective content density without compromising usability.

coastdigitalgroup/coastai-skills

Design a systematic, highly accessible, and developer-friendly UI layout framework for code blocks, snippet showcases, multi-file code tabs, line-highlighting, diff views, and syntax token contrast in technical documentation and developer platforms.

coastdigitalgroup/coastai-skills

Design a systematic framework for global command menus (Cmd+K panels) that combines keyboard-driven navigation, command execution, and shortcut discovery into an accessible, responsive overlay.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for threaded conversations, managing nesting depths, action hierarchies, and community signaling to foster engagement and readability.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for side-by-side comparison interfaces, managing high attribute density and responsive complexity to support informed decision-making.

coastdigitalgroup/coastai-skills

Design and implement a systematic framework for user privacy, managing consent banners, preference centers, and persistent privacy controls to balance legal compliance with user trust.

coastdigitalgroup/coastai-skills

Design and implement a systematic, highly accessible, and responsive visual layout framework for conversational chat widgets, live chat boxes, and chatbot panels that ensures clear message scannability, native focus flow, and seamless mobile keyboard adaptation.

coastdigitalgroup/coastai-skills

Design a systematic, accessible, and high-conversion framework for custom select dropdowns and comboboxes, defining anatomy, states, search-filtering, and responsive mobile-adaptive patterns.

coastdigitalgroup/coastai-skills

Design and implement a systematic color palette that ensures WCAG 2.2 accessibility compliance. Trigger this skill when asked to define brand colors, create UI themes, or establish a visual system for a website.

関連スキル