component

Breadcrumb

Shows a user’s location in a nested hierarchy as a trail of links. Rendered as a <nav aria-label="Breadcrumb"> wrapping an ordered list, with the last item marked aria-current="page" by default.

Default

Pass an items array; the last item is treated as the current page unless you set current explicitly.

---
// GENERATED from packages/demos/breadcrumb/default.demo.tsx — edit the source, not this file.
import Breadcrumb from "@pindoba/astro-breadcrumb";
---

<Breadcrumb
  items={[
    { label: "Home", href: "#" },
    { label: "Components", href: "#" },
    { label: "Breadcrumb" },
  ]}
/>

Size

Three sizes — sm, md, lg — scale the text only.

---
// GENERATED from packages/demos/breadcrumb/size.demo.tsx — edit the source, not this file.
import Breadcrumb from "@pindoba/astro-breadcrumb";
import { stack } from "@pindoba/styled-system/patterns";

const items = [
  { label: "Home", href: "#" },
  { label: "Docs", href: "#" },
  { label: "Breadcrumb" },
];
---

<div class={stack({ gap: "md", direction: "column" })}>
  <Breadcrumb size="sm" items={items} />
  <Breadcrumb size="md" items={items} />
  <Breadcrumb size="lg" items={items} />
</div>

Custom separator

Override the default / with any string via the separator prop.

---
// GENERATED from packages/demos/breadcrumb/custom-separator.demo.tsx — edit the source, not this file.
import Breadcrumb from "@pindoba/astro-breadcrumb";
---

<Breadcrumb
  separator="›"
  items={[
    { label: "Projects", href: "#" },
    { label: "pindoba", href: "#" },
    { label: "Settings" },
  ]}
/>

With icons

Each item can render a leading icon. In Astro pass an iconify icon name; in Svelte pass a snippet.

---
// GENERATED from packages/demos/breadcrumb/with-icons.demo.tsx — edit the source, not this file.
import Breadcrumb from "@pindoba/astro-breadcrumb";
import { BreadcrumbItem } from "@pindoba/astro-breadcrumb";
import { House, Book, Component } from "@lucide/astro";
---

<Breadcrumb>
  <BreadcrumbItem href="#">
    <Fragment slot="leading">
      <House size={16} />
    </Fragment>
    Home
  </BreadcrumbItem>
  <BreadcrumbItem href="#">
    <Fragment slot="leading">
      <Book size={16} />
    </Fragment>
    Library
  </BreadcrumbItem>
  <BreadcrumbItem current>
    <Fragment slot="leading">
      <Component size={16} />
    </Fragment>
    Components
  </BreadcrumbItem>
</Breadcrumb>
  • Components
  • Blocks