Command Palette

Search for a command to run...

Docs
Breadcrumb Dropdown

Breadcrumb Dropdown

Breadcrumb navigation that collapses middle items into a dropdown menu.

Installation

Usage

import BreadcrumbDropdown from "@/components/ruixen/breadcrumb-dropdown";
 
const items = [
  { label: "Home", href: "/" },
  { label: "Products", href: "/products" },
  { label: "Electronics", href: "/products/electronics" },
  { label: "Computers", href: "/products/electronics/computers" },
  { label: "Laptops", href: "/products/electronics/computers/laptops" },
  { label: "Gaming Laptops" },
];
 
export default function MyBreadcrumb() {
  return <BreadcrumbDropdown items={items} maxVisible={3} />;
}

Props

PropTypeDefaultDescription
itemsBreadcrumbDropdownItem[]-Array of breadcrumb items
maxVisiblenumber3Max items before collapsing
dropdownIcon"dots" | "folder""dots"Icon for the dropdown trigger
classNamestring-Additional CSS classes
PropertyTypeDescription
labelstringDisplay text for the item
hrefstringOptional link URL