Skip to main content
Our new developer certification is live!

Breadcrumb

Displays a breadcrumb navigation with responsive behavior (truncated on mobile, full on desktop).

Props

PropTypeRequiredDefaultDescription
itemsBreadcrumbItem[]Yes-Array of breadcrumb items
classNamestringNo-Additional CSS classes
interface BreadcrumbItem {
  label: string;
  href?: string;
}

Usage

import Breadcrumb from '@/components/molecules/Breadcrumb';

<Breadcrumb 
  items={[
    { label: "Home", href: "/" },
    { label: "Blog", href: "/blog" },
    { label: "Current Post" }
  ]}
/>

Features

  • Responsive: Shows full breadcrumb on desktop, truncated (last 2 items) on mobile
  • Schema.org markup: Includes proper microdata for SEO
  • Accessible: Uses semantic HTML with ARIA labels
  • Mobile optimization: Shows ellipsis (...) for truncated items on mobile
  • Last item: Current page is not clickable (no href)

Behavior

  • Desktop: Shows all breadcrumb items
  • Mobile: Shows ellipsis + last 2 items if more than 2 items exist
  • Last item is always non-clickable and styled differently
  • Items are separated by ">" character

Notes

  • Client-side component (uses 'use client')
  • Uses useMemo for performance optimization
  • Includes schema.org BreadcrumbList markup for SEO