Getting Started
Components
- Accordion
- Advanced Toast
- AlertMessage
- ArrowButton
- Arrows
- Avatar
- Backdrop
- Basic Toast
- Breadcrumb
- Button
- CardBackground
- Card
- Carousel
- Chapters
- ChatBody
- ChatButton
- ChatHeader
- ChatInput
- ChatMessageActions
- ChatMessageEditor
- ChatMessage
- ChatTypingIndicator
- ChatWindowCsatPrompt
- ChatWindowQuote
- ChatWindow
- CheckboxSelect
- Checkbox
- Checkboxes
- Chip
- ChoiceExpander
- Clickable
- ContentReview
- Countdown
- CriteriaDates
- CriteriaParticipants
- CriteriaTransports
- Date Field
- Datepicker
- Dropdown
- ElasticHeight
- ExpandableCard
- ExpandableText
- Filter
- FloatingLabelTextField
- Form Control
- Form Label
- Frame
- HamburgerIcon
- Heading
- Image
- JourneyCard
- LayerHeader
- Layer
- Link
- Loader
- Number Field
- PageNavigation
- Pagination
- Paragraph
- Password
- Phone Field
- Popin
- Portal
- ProductThumbnail
- Promises
- Prose
- Radio Group
- RadioSelect
- Radio
- Range
- Scrollbar
- Select
- SidebarLayout
- SliderFrame
- SparkleWrapper
- Spinner
- Switch
- Table
- Tabs
- Tag
- TextField
- Toggle
- Tooltip
- 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