@objectifthunes/whiteboard
NAVIGATION

Breadcrumbs

The structured trail, collapsing its middle once the hierarchy is deep. The last crumb is always plain text.


PREVIEW
ShallowDeep, middle collapsed
SOURCE
import { Breadcrumbs } from '@objectifthunes/whiteboard'
import Link from 'next/link'

<Breadcrumbs
  items={[
    { label: 'Clients', href: '/clients' },
    { label: 'Acme Industries', href: '/clients/acme' },
    { label: 'INV-2043' },          // no href: this is where you are
  ]}
  renderLink={(crumb, props) => <Link {...props} href={crumb.href!} />}
  maxItems={4}
/>
NOTES

The last item is always plain text carrying aria-current="page", whether or not you gave it an href. The page you are already on is not somewhere to navigate to.

Past maxItems (4 by default) the middle collapses to an ellipsis, always keeping the root and the last two. Pass maxItems={0} to never collapse.

TopBar takes a single string crumb, which is fine for a flat admin. Use this when the hierarchy is real and each level should be clickable.