Skip to main content
The Breadcrumbs component provides hierarchical navigation showing the user’s current location and allowing quick navigation to parent pages.

Basic usage

<flx-breadcrumbs [items]="breadcrumbItems"></flx-breadcrumbs>

Properties

items
BreadcrumbItem[]
required
Array of breadcrumb items to display
separator
string
default:"/"
Character or icon used to separate items
maxItems
number
Maximum number of items to show before collapsing
size
'small' | 'medium' | 'large'
default:"medium"
Size of the breadcrumb items
interface BreadcrumbItem {
  label: string;
  url?: string;
  icon?: string;
  active?: boolean;
}

Events

itemClick
EventEmitter<BreadcrumbItem>
Emitted when a breadcrumb item is clicked

Examples

<flx-breadcrumbs [items]="breadcrumbs"></flx-breadcrumbs>
export class ProductPage {
  breadcrumbs = [
    { label: 'Home', url: '/' },
    { label: 'Products', url: '/products' },
    { label: 'Electronics', url: '/products/electronics' },
    { label: 'Laptop', active: true }
  ];
}

Styling

flx-breadcrumbs {
  --flx-breadcrumb-font-size: 14px;
  --flx-breadcrumb-text-color: #6b7280;
  --flx-breadcrumb-link-color: #3b82f6;
  --flx-breadcrumb-link-hover-color: #2563eb;
  --flx-breadcrumb-active-color: #111827;
  --flx-breadcrumb-separator-color: #9ca3af;
  --flx-breadcrumb-icon-size: 16px;
  --flx-breadcrumb-spacing: 8px;
}

Accessibility

The Breadcrumbs component ensures full accessibility:
  • <nav> element with aria-label="breadcrumb"
  • <ol> for proper semantic structure
  • Current page marked with aria-current="page"
  • Keyboard navigation support
  • Screen reader friendly

Best practices

  • Always include “Home” or root level as the first item
  • Mark the current page as active: true and omit the url
  • Use consistent labeling across your application
  • Keep breadcrumb labels concise
  • Use maxItems for deep hierarchies to prevent overflow
  • Ensure breadcrumbs reflect the actual site structure
  • Update breadcrumbs dynamically as users navigate
For applications with deep navigation hierarchies, set maxItems to 4-5 to keep the breadcrumb trail manageable.
  • Stepper - For sequential process navigation
  • Tab Bar - For peer-level navigation

Build docs developers (and LLMs) love