Breadcrumb
Page Header Trail
A page header: the trail leads to the parent and the heading answers "where am I" — repeating the name in the crumbs is waste.
- breadcrumb
- header
- heading
- layout
Preview
1440pxHost theme
Use it with AI
- 1. Copy the link.
- 2. Write to your agent in your own words and drop the link into the sentence.
- 3. The agent opens the link and installs the component from the registry.
put this in the header: https://vibeui.ru/c/breadcrumb-006?lang=en
Breadcrumbs
12 components · updated today
Show the full instructions
What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.
# Install and place "breadcrumb-006" (Page Header Trail) from VibeUI
## 1. Install first — do not skip, do not recreate
Run this exact command before writing any code:
npx shadcn@latest add https://vibeui.ru/r/breadcrumb-006.json
Registry item: https://vibeui.ru/r/breadcrumb-006.json
Installs to: components/vibeui/breadcrumb-006.tsx (the exact path follows this project's components.json aliases).
npm dependencies: none.
Registry dependencies: none.
Install it from the registry. Do not recreate it from the description,
do not substitute a similar component from another library, and do not
rewrite it to match the project's existing style.
## 2. What it is
A page header: the trail leads to the parent and the heading answers "where am I" — repeating the name in the crumbs is waste.
A page header made of crumbs, an h1 and a meta line: the current level is not repeated because the heading names it. Zero dependencies, one file, no client JS.
## 3. How to use it
import { Breadcrumb006 } from "@/components/vibeui/breadcrumb-006"
<Breadcrumb006
items={[{ label: "Home", href: "/" }]}
title="Breadcrumbs"
meta="12 components"
/>
Read the installed file for the full prop list.
## 4. Where to place it
This is a small inline component. Put it exactly where the user asked,
inside the existing markup. Do not create a new page, section or
wrapper for it. If a similar control already sits in that spot,
replace it instead of adding a second one.
Placement: ___
(The user fills this line in. If it is still blank, ask where to put it
instead of guessing.)
## 5. Keep exactly as installed
- the local --vibeui-breadcrumb-006-* palette — do not swap it for your theme tokens
- leaving the current level out of the crumbs: the heading already answers it
- a real h1 instead of a large span — otherwise the page structure breaks
- nav with aria-label around the list
- the clamped heading size: on a phone it must not eat the first screen
- the top-down order: trail, heading, meta line
## 6. You may change
- the items array, title and meta
- the accent through the accent prop
- the block's max width
- the heading level if the page already has an h1
## 7. Rules
- If h1 is taken, swap the tag and keep the size: two h1s must not coexist.
- The meta line is not for actions: buttons live in breadcrumb-007.
- A long heading wraps rather than truncates: a page's name must not be cut.
- Do not lift the CSS variables into globals.css: the component has to stay a single file.
## 8. Verify
- it renders with no console errors;
- it looks like the preview on the VibeUI page you copied this from;
- if it does not, you changed something listed in section 5 — put it back.For developers
npx shadcn@latest add https://vibeui.ru/r/breadcrumb-006.jsonhttps://vibeui.ru/r/breadcrumb-006.jsonКомпонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-breadcrumb-006-*. Серверный: хуков нет. Крошки лежат в nav с aria-label, заголовок — настоящий h1, поэтому структура страницы не подменяется стилями. Кегль заголовка задан clamp: на телефоне он не съедает первый экран.
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
import type { ComponentPropsWithoutRef, CSSProperties } from "react"
export type Breadcrumb006Item = {
label: string
href?: string
}
export type Breadcrumb006Props = Omit<
ComponentPropsWithoutRef<"div">,
"children" | "title"
> & {
items?: Breadcrumb006Item[]
title?: string
meta?: string
accent?: string
}
// Идея компонента: шапка страницы, где путь и заголовок — одно целое.
// Название текущего уровня не дублируется в крошках: строка пути ведёт до
// родителя, а «где я» отвечает сам заголовок. Дублирование заставляет
// читать одно и то же дважды и съедает высоту первого экрана.
const STYLES = `
:where([data-vibeui-block="breadcrumb-006"]){
--vibeui-breadcrumb-006-surface:oklch(1 0 0);
--vibeui-breadcrumb-006-surface-border:oklch(0.91 0.006 265);
--vibeui-breadcrumb-006-fg:oklch(0.22 0.016 265);
--vibeui-breadcrumb-006-muted:oklch(0.56 0.014 265);
--vibeui-breadcrumb-006-accent:oklch(0.55 0.17 265);
--vibeui-breadcrumb-006-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
/* Собственная подложка: крошки — это текст, и на тёмной странице
он обязан читаться без правки палитры проекта. */
[data-vibeui-block="breadcrumb-006"]{
box-sizing:border-box;padding:0.5rem 0.75rem;
background:var(--vibeui-breadcrumb-006-surface);
border:1px solid var(--vibeui-breadcrumb-006-surface-border);border-radius:0.625rem;
display:flex;flex-direction:column;gap:0.375rem;
width:100%;max-width:32rem;
font-family:var(--vibeui-breadcrumb-006-font);color:var(--vibeui-breadcrumb-006-fg);
}
[data-vibeui-block="breadcrumb-006"] ol{
display:flex;flex-wrap:wrap;align-items:center;gap:0.375rem;
margin:0;padding:0;list-style:none;
font-size:0.75rem;line-height:1.3;color:var(--vibeui-breadcrumb-006-muted);
}
[data-vibeui-block="breadcrumb-006"] li{display:inline-flex;align-items:center;gap:0.375rem}
[data-vibeui-block="breadcrumb-006"] li + li::before{content:"/";color:oklch(0.78 0.01 265)}
[data-vibeui-block="breadcrumb-006"] a{color:inherit;text-decoration:none;border-radius:0.25rem}
[data-vibeui-block="breadcrumb-006"] a:hover{color:var(--vibeui-breadcrumb-006-fg);text-decoration:underline;text-underline-offset:3px}
[data-vibeui-block="breadcrumb-006"] a:focus-visible{outline:2px solid var(--vibeui-breadcrumb-006-accent);outline-offset:2px}
/* Заголовок отвечает «где я»: в крошках текущий уровень не повторяется. */
[data-vibeui-block="breadcrumb-006"] h1{
margin:0;font-size:clamp(1.25rem,2.5vw,1.75rem);line-height:1.15;
letter-spacing:-0.02em;font-weight:680;
}
[data-vibeui-block="breadcrumb-006"] [data-part="meta"]{
font-size:0.8125rem;line-height:1.4;color:var(--vibeui-breadcrumb-006-muted);
}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="breadcrumb-006"] *{animation:none!important;transition:none!important}}
`
const DEFAULT_ITEMS: Breadcrumb006Item[] = [
{ label: "Главная", href: "#" },
{ label: "Проекты", href: "#" },
{ label: "VibeUI", href: "#" },
]
/**
* Шапка страницы: путь до родителя и заголовок вместо последней крошки.
* Один файл, ноль зависимостей, собственная палитра.
*/
export function Breadcrumb006({
items = DEFAULT_ITEMS,
title = "Хлебные крошки",
meta = "12 компонентов · обновлено сегодня",
accent,
className,
style,
...props
}: Breadcrumb006Props) {
const palette = {
...(accent ? { "--vibeui-breadcrumb-006-accent": accent } : null),
...style,
} as CSSProperties
return (
<>
<style href="vibeui-breadcrumb-006" precedence="medium">
{STYLES}
</style>
<div
{...props}
data-vibeui-block="breadcrumb-006"
className={className}
style={palette}
>
<nav aria-label="Хлебные крошки">
<ol>
{items.map((item) => (
<li key={item.label}>
<a href={item.href ?? "#"}>{item.label}</a>
</li>
))}
</ol>
</nav>
<h1>{title}</h1>
{meta ? <p data-part="meta">{meta}</p> : null}
</div>
</>
)
}