Veil UI
Components

Breadcrumb

Shows the path to the current page with accessible navigation semantics.

Installation

$ npx veil-ui@latest add breadcrumb

Usage

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

<Breadcrumb>
  <BreadcrumbList>
    <BreadcrumbItem>
      <BreadcrumbLink href="/">Home</BreadcrumbLink>
    </BreadcrumbItem>
    <BreadcrumbSeparator />
    <BreadcrumbItem>
      <BreadcrumbPage>Components</BreadcrumbPage>
    </BreadcrumbItem>
  </BreadcrumbList>
</Breadcrumb>;

Examples

Basic

Collapsed

Custom separator

With icon

API reference

PropTypeDefaultDescription
aria-labelstring"breadcrumb"Name of the navigation landmark.
PropTypeDefaultDescription
asChildbooleanfalseRender your router link instead of an anchor.

BreadcrumbPage marks the current item with aria-current="page".

Accessibility

  • Renders a <nav> with an accessible name, plus an ordered list for structure.
  • Separators are presentational and hidden from assistive technology.
  • The collapsed item announces “More pages” through visually hidden text.
  • Use asChild on BreadcrumbLink to keep client-side routing.

Vue and plain HTML

This component also ships for Vue (Reka UI) and plain HTML. Install it with npx veil-ui add breadcrumb --framework vue or switch the framework in components.json.

<script setup lang="ts">
import { cn } from "@/lib/utils";

const props = defineProps<{ class?: string }>();
</script>

<template>
  <nav
    data-slot="breadcrumb"
    aria-label="breadcrumb"
    :class="cn('w-full', props.class)"
  >
    <slot />
  </nav>
</template>

On this page