We use cookies to ensure you get the best experience on our website. Read our privacy policy

Skip to main content

Directory

Breadcrumb Component

Create clear navigation paths that help users understand their location within your site’s hierarchy. The Breadcrumb component automatically transforms URLs into readable navigation trails and handles long paths elegantly.

  • Check Circle

    Automatic Path Generation: Converts URLs into readable navigation trails

  • Check Circle

    Smart Truncation: Handles long paths with dropdown menus

  • Check Circle

    Customizable Labels: Support for custom navigation text

  • Check Circle

    Responsive Design: Adapts to different screen sizes

<Breadcrumb href="/docs/components/breadcrumb" />
Home Docs Components Breadcrumb
<Breadcrumb
items={[
{ label: 'Documentation', href: '/docs/' },
{ label: 'Components', href: '/docs/components/' },
{ label: 'Navigation', href: '/docs/components/breadcrumb/' },
]}
/>
Home Documentation Components Navigation
<Breadcrumb
href="/docs/components/carousel/card/"
maxItems={4}
/>
Home Carousel Card
<Breadcrumb
items={[
{ label: 'Very Long Category Name', href: '/category' },
{ label: 'Product Details', href: '/category/product' },
]}
maxTextLength={10}
/>
Home Very Long ... Product De...
Breadcrumb Component Extends <div> HTMLElement
Prop Type Default Description
buttonProps ComponentProps<typeof Button> Props for the buttons
href string URL path to generate breadcrumbs from
items BreadcrumbItem[] [] Custom navigation items
maxItems number Maximum number of visible items
maxTextLength number Maximum length for item labels
showHome boolean true Show/hide home link

The breadcrumb component exposes several methods for programmatic control, allowing what would otherwise be a static component to be dynamic:

Breadcrumb Component Functions
Function Type Description
set: path string | BreadcrumbItem[] Set the breadcrumb path
set: showHome boolean Toggle home link visibility
set: maxItems number Set maximum items before collapsing
set: maxTextLength number Set maximum text length before truncating
BreadcrumbItem
type BreadcrumbItem = {
label: string;
href: string;
};
  • Check Circle

    URL Structure

    • Use clear, hierarchical URLs
    • Keep URL segments concise
    • Use consistent naming conventions
  • Check Circle

    Label Usage

    • Keep labels short and descriptive
    • Use consistent terminology
    • Consider mobile screen constraints
Documentation sections
Product categories
Multi-step forms
Checkout processes
Account settings
Configuration wizards

Limited Time Launch Sale

Ready to improve your site’s navigation? Get our AstroJS starter template now and implement intuitive breadcrumb trails in minutes.

GET 60% OFF!
North Star Themes Logo

Subscribe to our newsletter

Get the latest AstroJS tips and tricks right to your inbox

Email: [email protected]

© 2025 North Star Themes

Web Kit Provided By North Star Themes