Communitygithub.com

coastdigitalgroup/coastai-skills

通知管理システムのための体系的フレームワークを設計・実装します。グローバルアナウンスとコンテキストに応じたインライントバナーを管理し、ユーザーのフローを妨げることなくシステム状態を伝えます。

coastai-skills とは?

このスキル(Banner and Alert System)は、モーダルのようにユーザーの操作を強制停止することなく、バナーやアラートを用いてシステム状態を伝達するための設計手法を提供します。エラー、警告、成功、情報といったメッセージの重大度に基づいて適切な視覚スタイルと配置パターン(グローバル/ページ/インライン)を定義し、アクセシビリティ(ARIAロール、コントラスト比、タッチターゲットサイズ)にも配慮します。Claude Codeやその他のAIエージェントがUIコンポーネントを設計する際に、通知の優先順位付け、レイアウトシフトの抑制、ユーザー体験の一貫性を確保するための判断ルールを体系化しています。

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

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

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

ドキュメント

バナーおよびアラートシステム

目的

バナーおよびアラートシステムは、永続的ではなく、オーバーレイを使用しないコミュニケーション層を設計するための方法論を提供します。ユーザーを停止させるモーダルとは異なり、バナーやアラートは、ユーザーが現在のタスクを続けられるようにしながら、重要な情報(ステータス更新、警告、またはお知らせ)を提供します。このシステムにより、通知が視覚的に区別され、適切に優先順位付けられ、アクセシブルであることが保証されます。

ユースケース

  • サイト全体のお知らせを伝える(例:「2時間後にメンテナンスが予定されています」)。
  • フォーム内でコンテキストに応じたフィードバックを提供する(例:「変更が正常に保存されました」)。
  • アカウントに関する問題をユーザーに警告する(例:「サブスクリプションの有効期限が3日後に迫っています」)。
  • アプリ全体をブロックしないが機能に影響を与えるシステムエラーをユーザーに通知する(例:「銀行同期が現在利用できません」)。
  • プロモーションや新機能のローンチに関する「マーケティングバナー」を表示する。

使用すべきでない場合

  • クリティカルブロック: ユーザーが続行する前に必ずアクションを実行する必要がある場合は、overlay-and-dialog-system(モーダル)を使用します。
  • パッシブフィードバック: 短時間で消える優先度の低いステータス更新(例:「リンクをコピーしました」)には、トースト(overlay-and-dialog-system参照)を使用します。
  • データラベル: 単一アイテムの単純なステータスインジケータには、badge-and-tag-systemを使用します。
  • ナビゲーション: プライマリまたはセカンダリナビゲーションリンクにバナーを使用しないでください。site-navigation-systemを使用します。

入力

  1. メッセージの重大度: これはエラー、警告、成功、または情報メッセージですか?
  2. スコープ: これはグローバル(サイト全体)ですか、それともインライン(特定のセクション/ページ)ですか?
  3. 閉じられるかどうか: ユーザーはこのメッセージを非表示にできますか、それとも表示されたままにする必要がありますか?
  4. アクションの要件: メッセージはフォローアップアクション(例:「請求先情報を更新」)を必要としますか?
  5. ブランドパレット: ステータス状態の標準色(危険の赤、警告のアンバーなど)。

出力

  1. アラート構造仕様: アイコン、テキスト階層、アクションプレースメントの定義。
  2. 空間ロジック: バナーが表示される場所のルール(ビューポートの上部、コンテンツの上、セクション内)。
  3. 状態マトリックス: 異なるメッセージ重大度に対する視覚的処理。
  4. アクセシビリティ計画: インタラクティブなアラートのためのARIAロールとフォーカス管理ルール。

ワークフロー

1. アラートレベル(重大度)を決定する

意図に基づいて状態を割り当てます:

  • エラー(高優先度): 注意が必要だがビューを壊さないクリティカルな問題。
  • 警告(中優先度): 潜在的な問題または期限が迫っているもの。
  • 成功(低優先度): 完了したアクションの確認。
  • 情報/お知らせ: 中立的な情報またはマーケティング更新。

2. 配置パターンを選択する

  • グローバルバナー(トップバー): ビューポートの最上部に配置。高優先度のサイト全体のお知らせに最適。
  • ページバナー: グローバルヘッダーの下、ページコンテンツの上に配置。ページ固有の通知に最適。
  • インラインアラート: セクション内または関連コンポーネントの横(例:フォーム内)に直接配置。コンテキストに応じたフィードバックに最適。

3. コンポーネント構造を設計する

各アラートは一貫した内部階層に従う必要があります:

  • アイコン: 重大度の視覚的な省略形(例:成功のチェックマーク)。
  • タイトル(オプション): 長いアラート用の太字見出し。
  • 説明: コアメッセージ。簡潔に保ちます。
  • アクション: 次のステップのためのボタンまたはリンク。
  • 閉じるトリガー: アラートがクリティカルでない場合の「X」ボタン。

4. インタラクションルールを確立する

  • 永続性: アラートがアクション後、タイムアウト後(バナーには推奨されません)、または手動で閉じられた場合のみに消えるかを決定します。
  • レイアウトシフト管理: 表示されるバナーが不快なレイアウトシフト(CLS)を引き起こさないようにします。予約スペースまたはスムーズなトランジションを使用します。

5. レスポンシブ動作を定義する

  • スタッキング: モバイルでは、アクションが横に収まらない場合はテキストの下に移動する必要があります。
  • 幅: グローバルバナーは全幅。インラインアラートはコンテナの幅に従います。

決定ルール

  • 「一度に1つ」ルール: グローバルバナーを2つ以上積み重ねないでください。複数の通知がある場合は、単一の「通知センター」またはスライダーに統合します。
  • 色 + アイコン: アラートの状態を伝えるために色だけに依存しないでください。アクセシビリティのために常にアイコンを含めてください。
  • コンテキストによる配置: アラートがユーザーアクション(例:「保存」をクリック)によって発生した場合は、アクションポイントの近く(インライン)に配置します。システム状態の場合は、上部(グローバル)に配置します。
  • 閉じられるロジック: 「情報」および「成功」のバナーは常にユーザーが閉じられるようにしてください。「エラー」および「警告」のバナーは、根本的な問題が解決された場合にのみ閉じられるようにしてください。

制約

  • アクセシビリティ: 高優先度のエラーにはrole="alert"、低優先度の更新にはrole="status"を使用します。テキストのコントラスト比は4.5:1を確保します。グローバルバナーが固定/スティッキーである場合、コンテンツがスクロールしてもフォーカスされた要素を永続的に隠さないことを確認します(WCAG 2.2 SC 2.4.11)。
  • タイポグラフィ: 明確なフォントサイズ(最小14px)を使用し、長い説明にはすべて大文字を避けます。
  • モバイルリーチ: 閉じるボタンはWCAG 2.2 SC 2.5.8の最小24x24pxを満たし、レイアウトが許せば44x44pxまで大きくします。

一般的な失敗パターン

  • 「無視可能なエラー」: クリティカルなエラーに「情報」スタイルを使用し、ユーザーが重要な警告を見逃す原因となる。
  • 押し付けがましいマーケティング: 低価値のプロモーションにグローバルバナーを使用し、ユーザーを苛立たせ「アラート」領域の価値を低下させる。
  • アクションの欠如: 修正するための直接リンクを提供せずに、ユーザーに何かが間違っていること(例:「支払いが失敗しました」)を伝える。
  • レイアウトのガタつき: 「ポップイン」してページ全体のコンテンツを押し下げ、ユーザーが誤クリックする原因となるバナー。

検証基準

  • すべてのアラートは、その重大度に一致するアイコンと色の組み合わせを使用しています。
  • グローバルバナーは階層の最上部に配置されています。
  • インラインアラートは関連コンテンツの近くに配置されています。
  • すべてのインタラクティブ要素(閉じる、CTA)はWCAG 2.2の24x24px最小タッチターゲット(2.5.8)を満たしています。
  • 高優先度のアラートは適切なARIAロール(alert)を使用しています。
  • 閉じられるバナーはその状態を記憶しています(または再表示するタイミングのロジックを持っています)。

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, 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 specify a systematic dark theme framework, establishing rules for elevation-based surface colors, desaturated brand accents, text legibility, and media adaptation to ensure an accessible, low-fatigue experience.

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.

関連スキル