Skip to main content

Starwind UI v3.0 is now available! Migration guide

Breadcrumb

Installation

Usage

---
import { Breadcrumb, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbEllipsis } from "@/components/starwind/breadcrumb";
---
<Breadcrumb>
<BreadcrumbList>
<BreadcrumbItem>
<BreadcrumbLink href="/">Home</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbEllipsis />
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbLink href="/products/categories">Categories</BreadcrumbLink>
</BreadcrumbItem>
<BreadcrumbSeparator />
<BreadcrumbItem>
<BreadcrumbPage>Electronics</BreadcrumbPage>
</BreadcrumbItem>
</BreadcrumbList>
</Breadcrumb>

Composition

Use this structure for a breadcrumb trail:

Breadcrumb
└── BreadcrumbList
├── BreadcrumbItem
│ └── BreadcrumbLink
├── BreadcrumbSeparator
├── BreadcrumbItem
│ └── BreadcrumbEllipsis
├── BreadcrumbSeparator
└── BreadcrumbItem
└── BreadcrumbPage

Separator

The BreadcrumbSeparator component is used to visually separate items in the breadcrumb trail. By default, it displays a chevron-right icon, but you can provide your own custom separator.

Interactive Ellipsis

Use BreadcrumbEllipsis as a Dropdown trigger to reveal hidden path segments. Runtime owns focus, keyboard navigation, outside-click and Escape dismissal, and the popup’s entry and exit animations.

API Reference

Styled Component API

These props are added or materially changed by the installed styled component. Standard HTML attributes remain available through the inherited interfaces noted below. Expand a prop to see named type definitions and framework-specific imports. Follow the Primitive and Runtime links for lower-level behavior props.

Inherits a attributes.

Contains the following additional props:

Prop Type Default Toggle details
asChild boolean false
Description
Delegates markup and visual ownership to the child rather than preserving the native link recipe.
Classification
Wrapper prop

Changelog

View version history v1.2.2 7 releases

v1.2.2

  • In Astro, an attribute that you set on Breadcrumb and its parts now wins over the component’s own default for the same attribute, such as role or aria-label.

v1.2.1

  • The default export in index.ts now has a name, BreadcrumbParts, so framework tools show a clear name.

v1.2.0

  • The component is now available for React as well as Astro. Its props and styles stay the same.

v1.1.3

  • The Tailwind variants now live in their own variants.ts file in the component folder.

v1.1.1

  • Add named slot “icon” to BreadcrumbEllipsis to enable easy icon swapping, and a default slot for the sr-only label

v1.1.0

  • Add a data-slot attribute to all components to enable global styling updates

v1.0.0

  • Initial component release with starwind v1.5.0