DocsComponentsTemplatesThemesGitHub

Breadcrumbs

Path to the current page; last item is the current page.

Code

import * as React from 'react';
import { Breadcrumbs } from '@fruit-labs/design';

export default function Demo() {
  return (
    <Breadcrumbs
      items={[
        {
          label: 'Workspace',
          href: '#',
        },
        {
          label: 'Projects',
          href: '#',
        },
        {
          label: 'Mobile onboarding',
        },
      ]}
    />
  );
}

Install

From npm:

npm install @fruit-labs/design

import { Breadcrumbs } from '@fruit-labs/design';

Or copy the TypeScript source into your project:

npx shadcn@latest add https://design.fruitlabs.online/r/breadcrumbs.json

Guidelines

  • Show from the workspace root; truncate middle items on narrow screens.

Props

PropTypeRequired
itemsArray<{ label: React.ReactNode; href?: string; onClick?: () => void }>Yes
classNamestringNo

Edit this example on GitHub