Communitygithub.com

面包屑导航与路径指引系统

设计并实现系统化的二级导航路径,在深层信息架构中为用户提供方向感、上下文信息以及一键返回父级页面的能力。

面包屑导航与路径指引系统 是什么?

面包屑与路径指引系统(Breadcrumb and Wayfinding System)是一套用于设计二级导航路径的方法论,主要应用于电商、文档维基、SaaS 面板和目录站点等深层层级结构中。系统通过结构化的层级路径(如首页 > 分类 > 子类 > 产品)为用户提供清晰的位置感知,确保用户不会“迷失”在深层信息架构中。支持多个平台(Claude Code、Coder、Codex 等),基于 SKILL.md 文档中的工作流程执行:首先绘制从根节点到当前页面的层级路径,然后定义视觉组件(链接、分隔符、当前页标签),应用流体间距系统,实施截断与溢出策略(中间截断或标签截断),并针对移动端规划响应式适配(如“返回父级”模式或横向滚动)。系统具有严格决策规则(根节点始终存在、当前页不可点击、路径反映结构而非历史),并包含可访问性约束(使用 <nav aria-label='Breadcrumb'> 和有序列表 <ol>)以及验证标准,确保实现一致且易用的导航体验。

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

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

面包屑导航与路径指引系统 是做什么的?

目的

面包屑导航与路径指引系统提供了一种设计二级导航路径的方法论,这些路径位于主内容之上。它确保用户在深层信息架构(IA)中不会感到“迷失”,通过提供从当前位置到首页或根目录的清晰线性地图。该系统在导航精确性和最小视觉重量之间取得平衡,使用户能够理解上下文,并通过一次点击返回父级页面。

使用场景

  • 电子商务: 通过“分类 > 子分类 > 产品”进行导航。
  • 文档与维基: 在“卷 > 章节 > 节 > 页面”之间移动。
  • SaaS 仪表盘: 管理嵌套实体,如“账户 > 项目 > 资产”。
  • 目录站点: 通过“地点 > 分类 > 列表”进行浏览。
  • 搜索结果: 显示通过搜索找到的特定项目的路径。

何时不使用

  • 扁平架构: 如果网站只有 1–2 层深度(首页 > 页面),面包屑会增加不必要的杂乱。
  • 线性流程: 对于分步向导或结账流程,应使用“步骤进度系统”代替。
  • 动态/非层次路径: 如果用户的路径基于会话历史(例如“返回搜索结果”),而不是固定结构,请使用“返回”按钮。
  • 着陆页: 当目标是单一转化,导航会分散对主要行动按钮(CTA)的注意力时。

输入

  1. 信息架构(IA): 网站的层次结构图。
  2. 当前节点: 用户当前正在查看的特定页面。
  3. 父级层级: 从当前页面到根节点的祖先链。
  4. 显示约束: 可用的水平宽度(来自 responsive-grid-system)。

输出

  1. 路径指引蓝图: 标签、分隔符和链接的已定义结构。
  2. 截断策略: 在小型屏幕或溢出场景下处理长路径的规则。
  3. 响应式映射: 路径在移动端视口下如何折叠或变换。
  4. 语义无障碍层: 为屏幕阅读器定义的 ARIA 角色和标签。

工作流程

1. 映射层级路径

确定从首页/根节点到当前页面的绝对路径。 示例: 首页 > 资源 > 白皮书 > [当前页面标题]

2. 定义视觉结构

为每个组件建立样式:

  • 链接: 标准链接样式(来自 interactive-state-system)。
  • 分隔符: 一个非交互符号(例如 /、> 或 →),用于在视觉上区分层级。
  • 当前页面: 一个不可点击的纯文本标签,用于确认用户当前所在位置。

3. 建立空间节奏

应用 fluid-spacing-system:

  • 间距: 在链接和分隔符之间使用较小且一致的间距(例如 --space-xs)。
  • 垂直位置: 将路径一致地放置在主 <h1> 之上,但在全局站点页眉之下。

4. 实现截断与溢出

对于深度路径(4 层以上)或长标题:

  • 中间截断: 如果总宽度超过容器,将中间层级折叠成省略号(...)(例如 首页 > ... > 章节 > 页面)。
  • 标签截断: 对单个长标签使用 max-width 和 text-overflow: ellipsis,以防止换行。

5. 规划响应式适配

映射移动端体验:

  • “返回父级”模式: 在非常小的屏幕上,用单个“<- 返回 [父级]”链接替换完整路径,以节省空间。
  • 横向滚动: 如果必须保留完整路径,允许面包屑列表横向滚动。

决策规则

  • “始终有根节点”规则: 路径中的第一项应始终是功能根节点(通常为“首页”)。
  • 当前页面状态: 面包屑中的最后一项(当前页面)不能是链接。这可以防止用户点击指向他们当前所在页面的链接。
  • 逻辑路径 vs. 历史路径: 面包屑必须反映网站结构,而非用户的浏览器历史。
  • 分隔符可见性: 分隔符应具有比链接更低的视觉重量(例如,更暗淡的颜色),避免争夺注意力。

约束

  • 无障碍性: 必须包裹在带有 aria-label="Breadcrumb" 的 <nav> 元素中,并包含一个有序列表(<ol>),以便屏幕阅读器播报位置和总数。
  • 对比度: 链接和分隔符必须符合 WCAG AA(4.5:1)要求。
  • 触摸目标: 面包屑链接必须满足 WCAG 2.2 SC 2.5.8 的至少 24x24px 尺寸要求,即使可见文本可能更小。
  • 长度: 面包屑标签应精确匹配页面标题(或如果标题过长,则使用缩短版本)。

常见失败模式

  • “丢失首页”: 未包含首页/根节点链接,迫使用户使用主菜单重新开始。
  • 过度链接: 将当前页设为可点击链接,导致重新加载相同页面,混淆用户。
  • 视觉竞争: 使用过大或高对比度的分隔符,使路径难以阅读。
  • 换行断裂: 允许面包屑在移动端换行到 3 行以上,将主要内容推至页面底部。
  • IA 不一致: 根据用户到达页面的方式,显示同一页面的不同路径。

验证标准

  • 路径以首页/根节点开始。
  • 当前页面是最后一项且不可点击。
  • 面包屑包裹在带有 aria-label="Breadcrumb" 的 <nav> 地标中,并包含 <ol> 列表。
  • 使用了视觉分隔符,且对比度低于链接。
  • 路径能优雅地适应移动视口(截断或“返回”链接)。
  • 项目间间距一致,并遵循流体间距系统。
  • 键盘用户可以通过 Tab 键遍历中间链接。

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 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.

相关技能