MicroClub Breadcrumb
mcoli-ui-registry/mc-breadcrumbFreeComponent
A breadcrumb component for MicroClub UI
Live preview
live · rendered by the registry
Rendered by mcoli-ui-registry on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://mcoli-ui.microclub.info/r/mc-breadcrumb.jsonSource
1import * as React from 'react';2import { mergeProps } from '@base-ui/react/merge-props';3import { useRender } from '@base-ui/react/use-render';4import { ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';56import { cn } from '@/lib/utils';78function McBreadcrumb({ className, ...props }: React.ComponentProps<'nav'>) {9 return (10 <nav aria-label="breadcrumb" data-slot="breadcrumb" className={cn(className)} {...props} />11 );12}1314function McBreadcrumbList({ className, ...props }: React.ComponentProps<'ol'>) {15 return (16 <ol17 data-slot="breadcrumb-list"18 className={cn(19 'm-0 list-none border-0 p-0 flex flex-wrap items-center gap-1.5 paragraph-md font-medium text-muted-foreground',20 className21 )}22 {...props}23 />24 );25}2627function McBreadcrumbItem({ className, ...props }: React.ComponentProps<'li'>) {28 return (29 <li30 data-slot="breadcrumb-item"31 className={cn('inline-flex items-center gap-1', className)}32 {...props}33 />34 );35}3637function McBreadcrumbLink({ className, render, ...props }: useRender.ComponentProps<'a'>) {38 return useRender({39 defaultTagName: 'a',40 props: mergeProps<'a'>(41 {42 className: cn(43 'no-underline transition-colors text-muted-foreground hover:text-foreground hover:no-underline',44 className45 ),46 },47 props48 ),49 render,50 state: {51 slot: 'breadcrumb-link',52 },53 });54}5556function McBreadcrumbPage({ className, ...props }: React.ComponentProps<'span'>) {57 return (58 <span59 data-slot="breadcrumb-page"60 role="link"61 aria-disabled="true"62 aria-current="page"63 className={cn('font-normal paragraph-md font-medium text-foreground', className)}64 {...props}65 />66 );67}6869function McBreadcrumbSeparator({ children, className, ...props }: React.ComponentProps<'li'>) {70 return (71 <li72 data-slot="breadcrumb-separator"73 role="presentation"74 aria-hidden="true"75 className={cn('text-muted-foreground [&>svg]:size-3.5', className)}76 {...props}77 >78 {children ?? <ChevronRightIcon className="cn-rtl-flip translate-y-px" />}79 </li>80 );81}8283function McBreadcrumbEllipsis({ className, ...props }: React.ComponentProps<'span'>) {84 return (85 <span86 data-slot="breadcrumb-ellipsis"87 role="presentation"88 aria-hidden="true"89 className={cn(90 'flex size-5 items-center justify-center text-muted-foreground [&>svg]:size-4',91 className92// … truncated
What it pulls in
npm packages
Files it writes
More from mcoli-ui-registry
All 42 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| MicroClub Accordionmc-accordion | mcoli-ui-registry | Components | Free | 2 deps | |
| MicroClub Alertmc-alert | mcoli-ui-registry | Components | Free | 1 dep | |
| MicroClub Alert Dialogmc-alert-dialog | mcoli-ui-registry | Components | Free | 1 dep | |
| MicroClub Avatarmc-avatar | mcoli-ui-registry | Components | Free | 1 dep | |
| MicroClub Badgemc-badge | mcoli-ui-registry | Components | Free | 1 dep | |
| MicroClub Buttonmc-button | mcoli-ui-registry | Components | Free | 2 deps | |
| MicroClub Calendarmc-calendar | mcoli-ui-registry | Components | Free | 3 deps | |
| MicroClub Cardmc-card | mcoli-ui-registry | Components | Free | no deps |
