Communitygithub.com

搜尋介面系統

設計一套系統化框架,涵蓋端到端的搜尋體驗,定義搜尋觸發器、自動完成模式與結果頁面佈局的視覺與空間組織,以最大化可尋性。

搜尋介面系統 是什麼?

此技能專注於設計與實作網頁與應用程式的搜尋介面,提供一套從「搜尋觸發器」到「結果頁面」的系統化方法論。它涵蓋了各種使用情境,例如在 SaaS 應用程式中打造「指令中心」或「多功能搜尋框」、為電子商務設計「視覺搜尋」與自動完成下拉選單,以及為行動優先的介面規劃全螢幕搜尋覆蓋層。此技能強調無障礙性(遵循 ARIA APG Combobox 模式)、回應式設計(自動完成下拉選單不能超過視口寬度),以及對使用者體驗的細緻考量(例如「資訊的氣味」與「拇指區域操作」)。它適用於 Claude Code 與 Cursor 等 AI 代理平台,透過結構化的輸入(如使用者意圖、目錄密度)產出明確的規格(搜尋觸發器規格、自動完成解剖學、SERP 佈局藍圖),並提供決策規則(如可見性規則、最少三字元建議)與驗證標準,幫助開發者建立高效、易用且美觀的搜尋體驗。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/coastdigitalgroup/coastai-skills/tree/HEAD/website-design/search-interface-system

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

搜尋介面系統 是做什麼的?

目的

搜尋介面系統提供了一套方法論,用於設計一致且高效能的探索體驗。internal-search-optimization 側重於「成長」與邏輯層面,而本系統則定義了搜尋 UI 的設計模式與空間人體工學。它確保使用者能立即找到搜尋入口、輕鬆地與其互動(即使在行動裝置上),並以最小化認知負擔與最大化「資訊的氣味」的方式處理結果。

使用案例

  • 設計全域頁首或持久工具列中的搜尋入口。
  • 為 SaaS 應用程式打造「指令中心」或「多功能搜尋框」體驗。
  • 為電子商務結構化「視覺搜尋」與自動完成下拉選單。
  • 為文件或目錄設計高密度的搜尋結果頁面(SERP)。
  • 為行動優先設計實作「全螢幕搜尋」覆蓋層。

何時不該使用

  • 靜態登陸頁面: 內容固定且探索並非主要目標時。
  • 微型網站(少於 20 頁): 僅靠穩固的導航與麵包屑就足以滿足可尋性時。
  • 純關聯式儀表板: 資料僅透過定義好的篩選器與分頁標籤存取,而非透過自由文字搜尋時。

輸入

  1. 使用者意圖檔案: 使用者是在尋找特定 SKU(精確搜尋)還是探索某個主題(發現搜尋)?
  2. 目錄密度: 系統中有多少項目?中繼資料的多樣性如何?
  3. 主要裝置: 搜尋主要是在行動裝置(觸控)還是桌面裝置(鍵盤)上使用?
  4. 現有系統: 色彩系統、間距記號與字體級數(來自 fluid-spacing-system 與 fluid-typography-system)。

輸出

  1. 搜尋觸發器規格: 搜尋列的視覺定義(靜態、可展開或僅圖示)。
  2. 自動完成解剖學: 建議下拉選單的設計,包含類別、圖片與鍵盤狀態。
  3. SERP 佈局藍圖: 結果頁面的空間組織,平衡中繼資料密度與可讀性。
  4. 行動互動地圖: 搜尋如何從頁首圖示轉變為全螢幕聚焦介面的計畫。

工作流程

1. 定義搜尋觸發模式

根據其在使用者旅程中的重要性選擇觸發器:

  • 持久列: 始終可見、高對比的輸入框。最適合電子商務或搜尋為主的網站。
  • 可展開輸入框: 以圖示或小列開始,點擊後展開。最適合搜尋功能次要於導航的網站。
  • 「Command + K」觸發器: 一個微小的提示或圖示,用於開啟模態框。最適合高階使用者的 SaaS 工具或文件網站。

2. 設計自動完成(即時)體驗

透過提供即時回饋來縮短「結果的距離」:

  • 分類: 按類型分組結果(例如:產品、文章、說明)。
  • 豐富的中繼資料: 在下拉選單中包含小型縮圖、價格或狀態徽章。
  • 聚焦狀態: 使用 interactive-state-system 來清晰地突顯當前選中的建議,以便鍵盤使用者操作。
  • ARIA 模式: 將輸入/列表箱的關係建模為 ARIA APG Combobox 模式(role="combobox",搭配 aria-expanded、aria-controls 以及指向被突顯的 role="option" 的 aria-activedescendant),而不是自訂互動模型。

3. 建立結果頁面(SERP)層級

將 visual-hierarchy-system 應用於搜尋結果:

  • 「查詢回音」: 顯眼地顯示使用者的搜尋詞以確認上下文。
  • 結果卡片: 使用 card-ui-system 標準化結果格式。
  • 中繼資料權重: 確保標題最為突出,其次是「片段」(內容中與查詢相符的部分)。

4. 建置行動探索層

在行動裝置上,搜尋是一個專屬模式,而非一個小工具:

  • 模式轉換: 點擊搜尋應開啟一個全螢幕覆蓋層,以移除背景干擾。
  • 自動聚焦: 自動聚焦輸入框並觸發鍵盤。
  • 「拇指區域」操作: 將「清除」與「取消」按鈕放置在拇指易於觸及的範圍內(至少 44x44px)。

5. 定義載入與空白狀態

  • 骨架結果: 使用 skeleton-state-system 在擷取結果時維持佈局穩定性。
  • 智能無結果: 使用 empty-state-system 在無完全相符結果時提供替代路徑。

決策規則

  • 可見性規則: 如果搜尋功能被超過 30% 的使用者使用,則在桌面上必須是一個持久、全寬的輸入列。
  • 「最少三字元」規則: 在使用者輸入至少 3 個字元之前,不要開始顯示自動建議(以防止視覺抖動)。
  • 結果限制: 將自動完成建議限制在 5-8 個項目。如果還有更多,提供「查看『...』的所有結果」連結。
  • 資訊的氣味: 在搜尋結果片段中將相符的詞彙加粗,幫助使用者快速掃描以找到相關性。

限制條件

  • 無障礙性: 搜尋輸入框必須有可見的標籤(或 aria-label)。鍵盤使用者必須能使用方向鍵瀏覽自動完成列表、使用 Enter 選擇,並使用 Escape 關閉,而不會遺失已輸入的查詢。所有互動目標(清除按鈕、建議列)必須符合 WCAG 2.2 的 24x24px 最小目標尺寸(2.5.8)。
  • 回應式設計: 自動完成下拉選單絕不能超過視口寬度。
  • 對比度: 突顯相符文字必須符合 WCAG AA 對比度比率(通常使用背景顏色變換或加粗)。

常見失敗模式

  • 「隱藏的搜尋」: 當搜尋是使用者的主要導航方式時,卻強迫他們尋找放大鏡圖示。
  • 「脫節的」下拉選單: 自動完成選單的寬度或對齊方式與輸入框不一致,造成視覺上的「漂浮」。
  • 鍵盤陷阱: 不允許使用者使用 Escape 鍵退出搜尋覆蓋層或下拉選單。
  • 死胡同結果: 在結果頁面上未將搜尋詞保留在輸入框中,強迫使用者若想修改則必須重新輸入。

驗證標準

  • 搜尋入口在頁面掃描 2 秒內即可見。
  • 自動完成下拉選單在適當時包含豐富的中繼資料(圖片/標籤)。
  • 搜尋的鍵盤導航(方向鍵、Enter、Escape)已完全定義,並遵循 ARIA APG combobox 模式。
  • 行動搜尋開啟全螢幕模式,並立即聚焦鍵盤。
  • 搜尋結果頁面會回顯查詢並突顯相符詞彙。
  • 結果載入時使用骨架狀態。
  • 所有互動元素符合 44x44px 觸控目標最小尺寸。

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.

相關技能