用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/thedaviddias/ux-patterns-for-developers --skill breadcrumb命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | breadcrumb |
| description | Use when implementing help users understand their current location. |
| metadata | {"id":"breadcrumb","category":"navigation","pattern":"Breadcrumb","source":"uxpatterns.dev","url":"https://uxpatterns.dev/patterns/navigation/breadcrumb","sourcePath":"apps/web/content/patterns/navigation/breadcrumb.mdx"} |
Help users understand their current location
Breadcrumbs display as horizontal link lists separated by symbols, helping users understand their website location at a glance. Breadcrumbs work as secondary navigation aids showing users their current location and providing easy navigation back through parent pages. Websites with deep hierarchical structures or complex navigation paths benefit most from breadcrumbs.
Use Breadcrumbs to show users their location within a website's structure and help easy navigation. Common scenarios include:
references/pattern.md, then choose the smallest viable variation.Do's ✅
<nav> with aria-label="Breadcrumb" for landmark navigationaria-current="page"<ol> to convey sequenceTarget performance metrics for breadcrumb navigation:
Lazy Loading for Deep Hierarchies
// Load intermediate levels only when needed
const BreadcrumbTrail = ({ path }) => {
const [expanded, setExpanded] = useState(false);
if (path.length > 5 && !expanded) {
return (
<>
{path[0]}
<button onClick={() => setExpanded(true)}>...</button>
{path[path.length - 1]}
</>
);
}
return path.map(item => );
};
The Problem: The last breadcrumb item links to the current page, creating confusing circular navigation.
<!-- Bad -->
<a href="/current">Current Page</a>
<!-- Good -->
<span aria-current="page">Current Page</span>
How to Fix It:
Use a non-clickable span with aria-current="page" for the current page instead of a link.
The Problem: Relying on breadcrumbs instead of proper main navigation, leaving users without clear site structure.
How to Fix It: Always provide a main navigation menu. Breadcrumbs should supplement, not replace primary navigation.
The Problem: Breadcrumb trail doesn't match actual site structure, misleading users about their location.
<!-- Bad: Skipping levels -->
Product Details
<!-- Good: Full path -->
Products > Electronics > Product Details
How to Fix It: Show the complete meaningful hierarchical path without skipping levels. Include Home only when it is an explicit breadcrumb item.
For full implementation detail, examples, and testing notes, see references/pattern.md.
Pattern page: https://uxpatterns.dev/patterns/navigation/breadcrumb