Breadcrumb

Static accessible breadcrumb navigation showing the user's location in the app hierarchy.

Overview

The Breadcrumb component is a core building block of the Byteion design system, providing a robust, accessibility-compliant interface for its specific UI capabilities.

Why this exists

Breadcrumbs show the user's location in a hierarchy and provide quick backward navigation. They reduce disorientation in deep navigation trees.

Mental model

A breadcrumb is a path trail showing where the user is in a hierarchy. Each segment is a clickable link except the last (current page).

When to use

• E-commerce product categories • File manager paths • Documentation nested pages • Admin panels with 3+ levels

When not to use

• Do not use for flat navigation — use links • Avoid for single-level pages — the breadcrumb would be just the page name • Do not use as the primary navigation — it is supplementary

Basic example

The following example demonstrates standard usage, fully compliant with Byteion's token-first approach.

Variants

Each variant communicates a different meaning. Choose based on priority, not aesthetics.

Single default variant.

Sizes

Size should match the importance and context of the component.

  • md — md size.

States

This component reacts seamlessly to the following interaction and data states:

  • default — Resting appearance before interaction.
  • current — current state.
  • hover — Pointer is over the element — visual feedback via color or shadow.
  • focus — Keyboard or tab focus — shows ring indicator for accessibility.
  • active — Currently selected or in use.
  • disabled — Non-interactive — grayed out, cursor not-allowed.

Anatomy

• List — ordered sequence of links • Separator — chevron or slash between items • Current page — non-link, visually distinct • Home icon — optional first item

Usage guidelines

  • Show no more than 4 levels.
  • Current page should not be a link.
  • Use chevron or slash separator consistently.

Do and Don't

Do

  • Show max 4 levels.
  • Make current page non-clickable.
  • Use consistent separators.

Don't

  • Do not breadcrumb flat structures.
  • Do not link the current page.
  • Do not exceed 4 levels.

Accessibility

Uses <nav aria-label="Breadcrumb">. Current item has aria-current="page".

Role:navigation

ARIA Attributes

  • aria-label
  • aria-current
  • aria-hidden

Keyboard Navigation

  • Tab through breadcrumb links

Customization

Separator and text color follow muted tokens.

Compose with React cva()

Use the exportedcva() +cn() utilities to compose your own variant on top of the Byteion tokens.

import { cva, cn, type VariantProps } from '@byteion/react';

const myBreadcrumb = cva('base classes…', {
 variants: {
  accent: { soft:'border-primary-200', loud:'border-primary-500' },
 },
 defaultVariants: { accent:'soft' },
});

type Props = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof myBreadcrumb>;

Compose with Vue cva()

Use the exportedcva() +cn() utilities inside standard Vue setup blocks.

<script setup lang="ts">
import { computed, useAttrs } from 'vue';
import { cva, type VariantProps } from '@byteion/vue';

interface Props { accent?:'soft' |'loud' }
const props = withDefaults(defineProps<Props>(), { accent:'soft' });
const attrs = useAttrs();

const myBreadcrumb = cva('base classes…', {
  variants: { accent: { soft:'border-primary-200', loud:'border-primary-500' } },
});

const cls = computed(() => myBreadcrumb({ accent: props.accent, class: attrs.class as string | undefined }));
</script>

Runtime events

Byteion keeps framework APIs idiomatic: HTML uses DOM custom events, React uses callback props, and Vue uses emitted events / v-model updates.

HTML / JS events

No HTML runtime events are declared by this adapter.

React callbacks

No React callback events are declared by this adapter.

Vue emits

No Vue emitted events are declared by this adapter.

Remote / AJAX

This component does not implement Byteion JS remote loading. Use normal HTML form submission, framework state, or your application data layer around it.

API Reference

Static HTML. No JS required.

HTML Data Attributes

  • data-bi-component
  • data-bi-variant

React Props · BreadcrumbProps

Extracted directly fromreact/src/components/Breadcrumb.tsx.

export interface BreadcrumbProps extends HTMLAttributes<HTMLElement> {
  /** Separator rendered between items. Defaults to a chevron. */
  separator?: ReactNode | 'chevron' | 'slash' | 'dot' | 'arrow';
  /** Styling variant for items. */
  variant?: 'default' | 'muted' | 'bold';
  children?: ReactNode;
}

Vue Props · BreadcrumbProps

Extracted directly fromvue/src/components/Breadcrumb.vue.

export interface BreadcrumbProps {
  /** Separator rendered between items. Defaults to a chevron.
   *  Use the named `separator` slot for fully custom separator nodes. */
  separator?: 'chevron' | 'slash' | 'dot' | 'arrow';
  /** Styling variant for items. */
  variant?: 'default' | 'muted' | 'bold';
}

Developer tips

• Best practice: if the path is very long, collapse middle items into a"…" menu.

Common mistakes

  • Linking the current page — it should be non-clickable static text.
  • Using breadcrumb on flat pages with no real hierarchy.
  • Using breadcrumb as primary navigation instead of Navbar/Sidebar.
  • Showing too many levels without collapse.
  • Inconsistent separators across the app (chevron in one place, slash in another).
  • Vague labels like "Details" — use the actual page title.
  • Raw route slugs like /projects/123/settings — use human-readable labels.
  • Missing aria-current="page" on the current item.
  • Exposing separators as noisy screen-reader text — use aria-hidden="true".
  • Using raw colors instead of tokens.

Production usage tips

  • Test route-generated breadcrumbs for every nested route in the app.
  • Test long labels and mobile wrapping — ensure the breadcrumb wraps gracefully.
  • Test current page state — aria-current="page" must be present on the last item.
  • Test keyboard focus — Tab should move through ancestor links only.
  • Test screen reader output — separators should be hidden, current page announced.
  • Test dark mode and branded themes — token-based colors adapt automatically.
  • Keep React and Vue output aligned with the core HTML composition.
  • Consider structured data / SEO (Schema.org BreadcrumbList) only for public marketing, docs, and ecommerce pages — not for internal dashboards.

Premium examples

Advanced patterns available in Byteion Pro:

• Breadcrumb with collapsed ellipsis dropdown — middle levels hidden behind a "..." menu. • Breadcrumb generated from route metadata — map route config to human-readable labels with icons. • Ecommerce breadcrumb with category schema — structured data for SEO. • File-path breadcrumb — slash separator with folder icons per level. • Breadcrumb with icons per level — each ancestor shows a contextual icon. • Mobile-collapsed breadcrumb — shows only first and last items on small screens. • Permission-aware admin breadcrumb — hide inaccessible ancestor links based on user role.

Unlock Premium Patterns

Get access to copy-paste ready Pro blocks, SaaS templates, and advanced data-tables built with this component.

Explore Pro Components