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
When not to use
Basic example
The following example demonstrates standard usage, fully compliant with Byteion's token-first approach.
Breadcrumb - Free Version
Indicate the current page location and help users navigate hierarchy.
1. Basic Examples
2. With More Levels
3. Variants
4. Separators
5. Collapsed (For Long Paths)
6. Responsive Behavior
7. Customizations
import { Breadcrumb, BreadcrumbItem } from '@byteion/react';
export default function BreadcrumbDemo() {
return (
<Breadcrumb className="p-6">
<BreadcrumbItem href="/">Home</BreadcrumbItem>
<BreadcrumbItem href="/projects">Projects</BreadcrumbItem>
<BreadcrumbItem href="/projects/alpha">Alpha</BreadcrumbItem>
<BreadcrumbItem current>Settings</BreadcrumbItem>
</Breadcrumb>
);
}
<script setup lang="ts">
import { Breadcrumb, BreadcrumbItem } from '@byteion/vue';
</script>
<template>
<Breadcrumb class="p-6">
<BreadcrumbItem href="/">Home</BreadcrumbItem>
<BreadcrumbItem href="/projects">Projects</BreadcrumbItem>
<BreadcrumbItem href="/projects/alpha">Alpha</BreadcrumbItem>
<BreadcrumbItem current>Settings</BreadcrumbItem>
</Breadcrumb>
</template>
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
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-labelaria-currentaria-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-componentdata-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
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:
Related components
Unlock Premium Patterns
Get access to copy-paste ready Pro blocks, SaaS templates, and advanced data-tables built with this component.
Explore Pro Components