NOCTA UI

Breadcrumb

Displays the path to the current resource using a hierarchy of links.

Installation

Install the Breadcrumb component using the nocta-ui CLI:

npx nocta-ui add breadcrumb

Then import the components you need:

import {
  Breadcrumb,
  BreadcrumbList,
  BreadcrumbItem,
  BreadcrumbLink,
  BreadcrumbPage,
  BreadcrumbSeparator,
  BreadcrumbEllipsis,
} from '@/components/ui/breadcrumb';

Usage

Basic

Custom Separator

You can customize the separator between breadcrumb items.

With Icons

You can include icons in your breadcrumb links.

With Ellipsis

For long paths, you can use ellipsis to truncate the breadcrumb.

Sizes

The breadcrumb component supports three sizes: sm, md (default), and lg.

Small

Medium (Default)

Large

Ghost Variant

Use the ghost variant for a more subtle appearance.

API Reference

The root container for breadcrumb navigation.

PropTypeDefaultDescription
size"sm" | "md" | "lg""md"The size of the breadcrumb
separatorReact.ReactNode"/"Default separator between items
classNamestringundefinedAdditional CSS classes

Contains the list of breadcrumb items.

PropTypeDefaultDescription
size"sm" | "md" | "lg"InheritedOverride the size from context
classNamestringundefinedAdditional CSS classes

A wrapper for individual breadcrumb items.

PropTypeDefaultDescription
size"sm" | "md" | "lg"InheritedOverride the size from context
classNamestringundefinedAdditional CSS classes

A navigable link in the breadcrumb trail.

PropTypeDefaultDescription
variant"default" | "ghost""default"The visual style of the link
size"sm" | "md" | "lg"InheritedOverride the size from context
classNamestringundefinedAdditional CSS classes

Represents the current page in the breadcrumb trail.

PropTypeDefaultDescription
size"sm" | "md" | "lg"InheritedOverride the size from context
classNamestringundefinedAdditional CSS classes

A separator between breadcrumb items.

PropTypeDefaultDescription
size"sm" | "md" | "lg"InheritedOverride the size from context
childrenReact.ReactNodeInheritedCustom separator content
classNamestringundefinedAdditional CSS classes

An ellipsis indicator for truncated breadcrumb paths.

PropTypeDefaultDescription
classNamestringundefinedAdditional CSS classes