Breadcrumb
File Path
A filesystem path: it arrives as one string, splits into levels and prints in a monospaced face.
- breadcrumb
- path
- mono
- files
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-008?lang=en
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-008" (File Path) 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-008.json
Registry item: https://vibeui.ru/r/breadcrumb-008.json
Installs to: components/vibeui/breadcrumb-008.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 filesystem path: it arrives as one string, splits into levels and prints in a monospaced face.
Breadcrumbs for a file path: the string splits into levels, the face is monospaced and the filename stands out. Zero dependencies, one file, no client JS.
## 3. How to use it
import { Breadcrumb008 } from "@/components/vibeui/breadcrumb-008"
<Breadcrumb008 path="registry/components/breadcrumb/breadcrumb-008.tsx" />
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-008-* palette — do not swap it for your theme tokens
- the string input instead of an array: a path is stored as a string
- the monospaced face: dots, dashes and case matter in paths
- the separator as a variable — a Windows path is one prop away
- the emphasis on the filename: that is what the eye hunts for
- the "file path" aria-label on nav rather than a generic "breadcrumbs"
## 6. You may change
- path and separator
- the level URLs in the caller
- the accent through the accent prop
- the background and border to match your code blocks
## 7. Rules
- The links are placeholders: pass real level URLs or the path only displays.
- Empty segments are dropped, so a leading slash does not create an empty crumb.
- A very long path wraps: if that hurts, take the scrolling variant breadcrumb-005.
- 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-008.jsonhttps://vibeui.ru/r/breadcrumb-008.jsonКомпонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-breadcrumb-008-*. Серверный: хуков нет. На вход приходит строка пути, а не массив: путь так и хранится. Разделитель уходит в переменную и печатается псевдоэлементом, поэтому Windows-путь с обратным слэшем задаётся одним пропом. Имя файла — последний уровень с aria-current.
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 Breadcrumb008Props = Omit<
ComponentPropsWithoutRef<"nav">,
"children"
> & {
path?: string
separator?: string
accent?: string
}
// Идея компонента: путь файловой системы, а не сайта. Он приходит одной
// строкой и разбирается на уровни, потому что путь так и хранится; собирать
// массив вручную ради показа — лишняя работа. Шрифт моноширинный: в путях
// важны точки, дефисы и регистр, а пропорциональный шрифт их смазывает.
const STYLES = `
:where([data-vibeui-block="breadcrumb-008"]){
--vibeui-breadcrumb-008-fg:oklch(0.28 0.014 265);
--vibeui-breadcrumb-008-muted:oklch(0.55 0.012 265);
--vibeui-breadcrumb-008-bg:oklch(0.97 0.003 265);
--vibeui-breadcrumb-008-border:oklch(0.91 0.006 265);
--vibeui-breadcrumb-008-accent:oklch(0.55 0.17 265);
--vibeui-breadcrumb-008-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
}
[data-vibeui-block="breadcrumb-008"]{
display:inline-block;max-width:100%;box-sizing:border-box;
padding:0.3125rem 0.5rem;
border:1px solid var(--vibeui-breadcrumb-008-border);border-radius:0.5rem;
background:var(--vibeui-breadcrumb-008-bg);
font-family:var(--vibeui-breadcrumb-008-mono);font-size:0.75rem;line-height:1.4;
color:var(--vibeui-breadcrumb-008-muted);
}
[data-vibeui-block="breadcrumb-008"] ol{
display:flex;align-items:center;gap:0.125rem;flex-wrap:wrap;
margin:0;padding:0;list-style:none;
}
[data-vibeui-block="breadcrumb-008"] li{display:inline-flex;align-items:center;gap:0.125rem;min-width:0}
/* Разделитель в CSS: иначе скринридер прочитает «слэш» на каждом уровне. */
[data-vibeui-block="breadcrumb-008"] li + li::before{
content:var(--vibeui-breadcrumb-008-separator,"/");color:oklch(0.75 0.01 265);
}
[data-vibeui-block="breadcrumb-008"] a{
color:inherit;text-decoration:none;padding:0 0.0625rem;border-radius:0.1875rem;
}
[data-vibeui-block="breadcrumb-008"] a:hover{color:var(--vibeui-breadcrumb-008-fg);background:oklch(0.93 0.006 265)}
[data-vibeui-block="breadcrumb-008"] a:focus-visible{outline:2px solid var(--vibeui-breadcrumb-008-accent);outline-offset:1px}
/* Имя файла выделено: в длинном пути глаз ищет именно его. */
[data-vibeui-block="breadcrumb-008"] [aria-current="page"]{color:var(--vibeui-breadcrumb-008-fg);font-weight:650}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="breadcrumb-008"] *{animation:none!important;transition:none!important}}
`
/**
* Путь файловой системы: строка разбирается на уровни, шрифт моноширинный.
* Один файл, ноль зависимостей, собственная палитра.
*/
export function Breadcrumb008({
path = "registry/components/breadcrumb/breadcrumb-008.tsx",
separator = "/",
accent,
className,
style,
...props
}: Breadcrumb008Props) {
const parts = path.split(separator).filter(Boolean)
const palette = {
"--vibeui-breadcrumb-008-separator": `"${separator}"`,
...(accent ? { "--vibeui-breadcrumb-008-accent": accent } : null),
...style,
} as CSSProperties
return (
<>
<style href="vibeui-breadcrumb-008" precedence="medium">
{STYLES}
</style>
<nav
{...props}
data-vibeui-block="breadcrumb-008"
aria-label="Путь к файлу"
className={className}
style={palette}
>
<ol>
{parts.map((part, index) => {
const last = index === parts.length - 1
return (
<li key={`${part}-${index}`}>
{last ? (
<span aria-current="page">{part}</span>
) : (
<a href="#">{part}</a>
)}
</li>
)
})}
</ol>
</nav>
</>
)
}