Glrk UI

Breadcrumb

A simplified wrapper for Shadcn Breadcrumb with flexible option handling and automatic type conversion

Installation

npx shadcn@latest add @glrk-ui/breadcrumb

If you haven't set up the prerequisites yet, check out registry setup.

Usage

Basic

import { BreadcrumbWrapper } from "@/components/ui/accordion";

export function Basic() {
  return (
    <BreadcrumbWrapper
      items={["Store", "Products", "Electronics", "Computers"]}
    />
  )
}

Advanced

import { BreadcrumbWrapper } from "@/components/ui/accordion";

export function Basic() {
  return (
    <BreadcrumbWrapper
      items={[
        { label: "Home", href: "/" },
        { label: "Products", href: "/products" },
        { label: "Category", href: "/products/category" },
        { label: "Electronics", href: "/products/category/electronics" },
        { label: "Laptops", href: "/products/category/electronics/laptops" },
        { label: "MacBook Air M3" }
      ]}
      collapseType="dropdown"
      itemsAfterCollapse={2}
    />
  )
}

Reference

Prop

Type

Prop

Type