Getting Started
Components
- Advanced Toast
- ArrowButton
- Arrows
- Avatar
- Backdrop
- Basic Toast
- Breadcrumb
- Button
- CardBackground
- Card
- ChatButton
- Checkbox
- Checkboxes
- Chip
- ChoiceExpander
- Clickable
- Date Field
- Dropdown
- ElasticHeight
- ExpandableCard
- Filter
- FormCheckbox
- Form Control
- Form Label
- HamburgerIcon
- Heading
- Image
- Link
- Loader
- Number Field
- Pagination
- Password
- Phone Field
- Popin
- Portal
- Prose
- Radio Group
- Radio
- Range
- Select
- SidebarLayout
- Spinner
- Switch
- Tabs
- Tag
- TextField
- ValidationMessage
'use client';
import { Breadcrumb } from '@/ui/Breadcrumb';
export function BreadcrumbDemo() {
return (
<Breadcrumb
items={[
{ label: 'Home', href: '/' },
{ label: 'Products', href: '/products' },
{ label: 'Category', href: '/products/category' },
{ label: 'Current Page', href: '/products/category/item' },
]}
theme="light"
/>
);
}
Installation
npx shadcn@latest add https://develop.trident-ui.pro.clubmed/r/breadcrumb.json
Usage
import Breadcrumb from '@/docs/lib/ui/breadcrumb';
export function Component() {
return (
<Breadcrumb
items={[
{ label: 'Home', href: '/' },
{ label: 'Products', href: '/products' },
{ label: 'Category', href: '/products/category' },
{ label: 'Current Page', href: '/products/category/item' },
]}
theme="light"
/>
);
}API Reference
Breadcrumb
| Prop | Type | Default | Description |
|---|---|---|---|
items | ({ href: string; label: string } & ComponentPropsWithoutRef<"li">)[] | Required | Array of breadcrumb items. Each item contains a label (displayed text) and href (link URL). The last item is automatically styled as the current page. |
theme | "light" | "dark" | "light" | Visual theme of the breadcrumb. Controls the color scheme of the links and separators. |
Notes
- If more than 3 items are provided, the breadcrumb will automatically collapse the middle items, showing only the first two items, a spacer, and the last item
- The last item in the breadcrumb is automatically marked with
aria-current="page"for accessibility - Items are separated by a diamond icon
- The component returns
nullif an empty items array is provided