BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/zyeon/breadcrumbs

Breadcrumbs

zyeon/breadcrumbs
FreeComponent

An accessible breadcrumb trail with collapsible overflow — first item + ellipsis + last items once maxItems is exceeded.

Install it

npx shadcn@latest add https://ui.zyeon.ai/r/breadcrumbs.json

Source

src/registry/ui/breadcrumbs.tsxui.zyeon.ai/r/breadcrumbs.json
1"use client"
2
3import * as React from "react"
4import { ChevronRight, MoreHorizontal } from "lucide-react"
5import { cn } from "@/lib/utils"
6
7export interface BreadcrumbItem {
8 label: string
9 /** Omit on the last (current) item — it renders as text with aria-current="page". */
10 href?: string
11}
12
13export interface BreadcrumbsProps extends React.HTMLAttributes<HTMLElement> {
14 items: BreadcrumbItem[]
15 /** Collapse to first item + ellipsis + last (maxItems - 1) items once items.length exceeds this. 0 disables collapsing. */
16 maxItems?: number
17 /** Rendered between items and after the ellipsis; aria-hidden. Defaults to a chevron. */
18 separator?: React.ReactNode
19}
20
21const DEFAULT_SEPARATOR = <ChevronRight className="size-3.5" />
22
23type Cell = { kind: "item"; item: BreadcrumbItem } | { kind: "ellipsis" }
24
25export const Breadcrumbs = React.forwardRef<HTMLElement, BreadcrumbsProps>(
26 ({ items, maxItems = 0, separator = DEFAULT_SEPARATOR, className, ...props }, ref) => {
27 // One-way expansion: once the ellipsis is pressed it never collapses again, so this
28 // state stays internal.
29 const [expanded, setExpanded] = React.useState(false)
30 const olRef = React.useRef<HTMLOListElement | null>(null)
31 // maxItems=1 would collapse the aria-current page itself, so clamp to 2 (first + last).
32 const effectiveMax = maxItems > 0 ? Math.max(maxItems, 2) : 0
33 const collapsed = effectiveMax > 0 && items.length > effectiveMax && !expanded
34
35 const cells: Cell[] = collapsed
36 ? [
37 { kind: "item", item: items[0] },
38 { kind: "ellipsis" },
39 ...items.slice(items.length - (effectiveMax - 1)).map((item): Cell => ({ kind: "item", item })),
40 ]
41 : items.map((item): Cell => ({ kind: "item", item }))
42
43 const handleExpand = () => {
44 setExpanded(true)
45 // The ellipsis button unmounts with the expansion and focus falls to body — move it
46 // to the first newly revealed link (anchors[0] is the always-present first crumb,
47 // [1] onwards only exist once expanded).
48 requestAnimationFrame(() => {
49 const anchors = olRef.current?.querySelectorAll("a")
50 ;(anchors?.[1] ?? anchors?.[0])?.focus()
51 })
52 }
53
54 return (
55 <nav aria-label="Breadcrumb" className={cn("text-sm", className)} ref={ref} {...props}>
56 <ol className="flex flex-wrap items-center gap-1.5" ref={olRef}>
57 {cells.map((cell, index) => {
58 const isLast = index === cells.length - 1
59// … truncated

What it pulls in

npm packages

  • lucide-react

Other registry items

  • utils

Files it writes

  • src/registry/ui/breadcrumbs.tsx

Facts

Registry
zyeon
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-13
Last confirmed
yesterday

Go to the source

ui.zyeon.ai Zyeon-AI/zyeon-ui-components on GitHub Raw registry item This item as JSON

More from zyeon

All 893 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
A/B Test Resultab-test-resultzyeonComponentsPaid2 deps · 2 files
AccordionaccordionzyeonComponentsFree1 dep
Activity Feedactivity-feedzyeonComponentsFree2 deps · 2 files
Activity Heatmapactivity-heatmapzyeonComponentsPaid1 dep · 2 files
Address Formaddress-formzyeonComponentsPaid1 dep
Agent Graphagent-graphzyeonComponentsFree2 deps · 2 files
Agent Handoffagent-handoffzyeonComponentsFree1 dep
Agent Inboxagent-inboxzyeonComponentsFree2 deps · 2 files

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored from measured facts

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex