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.jsonGuidelines
- Show from the workspace root; truncate middle items on narrow screens.
Props
| Prop | Type | Required |
|---|---|---|
items | Array<{ label: React.ReactNode; href?: string; onClick?: () => void }> | Yes |
className | string | No |