1. Home
  2. Experiments
  3. UI
  4. Breadcrumb

Breadcrumb

Breadcrumbs help users navigate your site

Installation

bunx shadcn@latest add https://maxwiseman.io/experiments/ui/breadcrumb/json

Additions

The breadcrumb component is based off of the shadcn/ui component of the same name. It has, however, seen one notable addition. That being the BreadcrumbGroup component. This component provides all of the functionality that you could want, while significantly simplifying the code.

Usage

import { BreadcrumbGroup } from 'path/to/component';
 
export function MyComponent() {
  return (
    <BreadcrumbGroup items={[
      { title: 'Home', href: '/' },
      { title: 'Page 1', href: '/page1' },
      { title: 'Page 2', href: '/page2' }
    ]} />
  )
}