Skip to content
Klarhimmel UI

Breadcrumb

npx shadcn add @klarhimmel/breadcrumb

Examples

  • Basic

  • Long

  • Two levels

DetailsAbout, usage, props and more

The path to the current page: links up the tree, then the page itself.

When to use

  • Use for

    Showing where a page sits in a site more than two levels deep.

  • Not for

    Steps in a process. Use a numbered list. Not a replacement for the main navigation.

  • Pairs with

    Header, page titles.

Preview

breadcrumb.tsx
import { Theme } from '@/components/klarhimmel/theme/style';
import { Breadcrumb } from '@/components/klarhimmel/ui/breadcrumb';

export default function Example() {
  return (
    <Theme theme="brand">
      <Breadcrumb items={[
        { label: 'Home', href: '/' },
        { label: 'Rooms', href: '/rooms' },
        { label: 'Garden room' },
      ]} />
    </Theme>
  );
}

Import

Import

import { Breadcrumb } from '@/components/klarhimmel/ui/breadcrumb';
Files
breadcrumb.tsx, in components/klarhimmel/ui/. With it: button, theme, utils. npm: lucide-react.
Render in
Render it inside <Theme>, once near the root of your app. Tokens and fonts are scoped to it, so outside it the component is unstyled.

Props

PropTypeDefaultDescription
itemsBreadcrumbItem[]requiredRequired. In order from the top. The last item is the current page and is not a link.
labelstring'Breadcrumb'Accessible name of the navigation landmark.
classNamestring-Extra classes, merged after the component's own.

Accessibility

KeyDoes
TabMoves through the links
EnterFollows a link

The last item is the current page: aria-current="page", not a link. Long paths wrap; long labels truncate.

Accessibility