breadcrumbs

Accumulates breadcrumb navigation items across nested Rango route segments with automatic deduplication.

Updated Nov 7, 2025
One-click install
npx skills add https://github.com/rangojs/rango --skill breadcrumbs-rangojs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: breadcrumbs
Source: https://github.com/rangojs/rango/tree/main/packages/rangojs-router/skills/breadcrumbs
Command: npx skills add https://github.com/rangojs/rango --skill breadcrumbs-rangojs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @rangojs/router.

What problem does it solve? Building breadcrumb trails in nested route hierarchies normally requires manually threading navigation state through layouts and pages. This Skill documents Rango's built-in Breadcrumbs handle, which lets each route segment push its own crumb and automatically collects them in parent-to-child order. ## Core Features & Use Cases - Server-side crumb pushing: Handlers and loader bodies push items via ctx.use(Breadcrumbs), with support for async content and deferred resolution via .defer() for values produced by deep components. - Client-side consumption: Read the accumulated trail with useHandle(Breadcrumbs) in client components, with optional selectors to re-render only on relevant changes. - Automatic deduplication: The built-in collect function deduplicates items by href, so sibling routes sharing a crumb never produce duplicates. - Use Case: On a route like /shop/widget, a root layout pushes "Home", a nested layout pushes "Shop", and the route handler pushes the product slug — the rendered trail is Home / Shop / widget with no manual prop threading. ## Quick Start Show me how to add a breadcrumb trail to my nested Rango routes using the built-in Breadcrumbs handle.

Frequently Asked Questions about breadcrumbs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add breadcrumbs to nested routes in Rango?

Import Breadcrumbs from @rangojs/router and call ctx.use(Breadcrumbs) inside each layout or route handler to push an item with label and href. Items accumulate in parent-to-child order, so nested segments automatically build the full trail.

How do I render breadcrumbs in a client component?

Use useHandle(Breadcrumbs) from @rangojs/router/client inside a client component to read the accumulated array. You can map over it to render links, marking the last item with aria-current="page".

Can loaders push breadcrumbs in Rango?

Yes, loader bodies push crumbs with the same ctx.use(Breadcrumbs) API as handlers. To guarantee the crumb lands in the SSR'd document, register the loader with { ssr: false }; otherwise late pushes stream and apply client-side.

Does Rango deduplicate breadcrumb items?

Yes, the built-in collect function deduplicates by href, and the last pushed item wins. This prevents duplicate entries when sibling routes share a common breadcrumb.

When should I use .defer() instead of pushing a breadcrumb directly?

Use .defer() only when label and href are unknown at handler time and the value is produced by a deep async component, not a loader. If only the content is async, push a concrete item with a Promise in the content field instead.