Display
Linked Nav Row
A navigation row where the block root is the a element itself: the target is not emulated by a pseudo-element, and the arrow shifts alike on hover and focus.
- item
- row
- link
- navigation
Preview
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/item-004?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 "item-004" (Linked Nav Row) 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/item-004.json
Registry item: https://vibeui.ru/r/item-004.json
Installs to: components/vibeui/item-004.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 navigation row where the block root is the a element itself: the target is not emulated by a pseudo-element, and the arrow shifts alike on hover and focus.
A link row: title, description, counter and arrow, with the block root being the a element itself. Zero dependencies, one file.
## 3. How to use it
import { Item004 } from "@/components/vibeui/item-004"
<Item004 title="Notifications" href="/settings/notifications" />
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-item-004-* palette — do not swap it for your theme tokens
- the link root: it gives a real target without a stretched pseudo-element
- the shared rule for :hover and :focus-visible — the keyboard state must not be poorer than the mouse one
- aria-hidden on the arrow: "right arrow" adds nothing in speech
- the visible focus ring on the whole row, not on the title alone
- changing the border colour together with the background: the fill alone is too weak on a light surface
## 6. You may change
- title and meta — the title and the description
- hint — the counter or a short note on the right
- href — the row target, and the accent through the accent prop
- the row width
## 7. Rules
- No second link or button may go inside: nested interactive elements are invalid.
- For a row with an action button use item-003.
- Put link rows inside a <nav> or a <ul> — a bare run of links reads worse.
- 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/item-004.jsonhttps://vibeui.ru/r/item-004.jsonКомпонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-item-004-*. Серверный: хуков нет. Корневой элемент — a, поэтому строка попадает в список ссылок страницы целиком, а не одним названием, и не требует растянутого ::after, как item-001. Состояния :hover и :focus-visible описаны одним правилом, поэтому клавиатурный сценарий выглядит так же, как мышиный.
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 Item004Props = Omit<
ComponentPropsWithoutRef<"a">,
"children" | "title"
> & {
title?: string
meta?: string
hint?: string
accent?: string
}
// Идея компонента: строка, которая сама является ссылкой. В item-001 ссылка
// растянута псевдоэлементом внутри строки — здесь корень блока и есть тег a,
// поэтому цель не нужно эмулировать: её знает браузер, и она попадает в список
// ссылок страницы с полным текстом. Стрелка сдвигается на наведении и фокусе
// одинаково — состояние клавиатуры не должно выглядеть беднее мышиного.
const STYLES = `
:where([data-vibeui-block="item-004"]){
--vibeui-item-004-bg:oklch(1 0 0);
--vibeui-item-004-fg:oklch(0.23 0.014 265);
--vibeui-item-004-muted:oklch(0.56 0.014 265);
--vibeui-item-004-border:oklch(0.9 0.006 265);
--vibeui-item-004-hover:oklch(0.975 0.003 265);
--vibeui-item-004-accent:oklch(0.55 0.19 262);
--vibeui-item-004-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
[data-vibeui-block="item-004"]{
display:flex;align-items:center;gap:0.75rem;text-decoration:none;
width:100%;max-width:22rem;box-sizing:border-box;padding:0.6875rem 0.875rem;
background:var(--vibeui-item-004-bg);
border:1px solid var(--vibeui-item-004-border);border-radius:0.75rem;
font-family:var(--vibeui-item-004-font);color:var(--vibeui-item-004-fg);
transition:background-color .15s ease,border-color .15s ease;
}
[data-vibeui-block="item-004"] *{box-sizing:border-box}
[data-vibeui-block="item-004"]:hover,
[data-vibeui-block="item-004"]:focus-visible{
background:var(--vibeui-item-004-hover);
border-color:color-mix(in oklab,var(--vibeui-item-004-accent) 35%,var(--vibeui-item-004-border));
}
[data-vibeui-block="item-004"]:focus-visible{outline:2px solid var(--vibeui-item-004-accent);outline-offset:2px}
[data-vibeui-block="item-004"] [data-part="text"]{flex:1 1 auto;min-width:0;display:grid;gap:0.125rem}
[data-vibeui-block="item-004"] [data-part="title"]{font-size:0.875rem;font-weight:650;line-height:1.3}
[data-vibeui-block="item-004"] [data-part="meta"]{font-size:0.75rem;line-height:1.35;color:var(--vibeui-item-004-muted)}
[data-vibeui-block="item-004"] [data-part="hint"]{
flex:none;font-size:0.6875rem;color:var(--vibeui-item-004-muted);font-variant-numeric:tabular-nums;
}
/* Стрелка едет одинаково на наведении и на фокусе: клавиатура не второй сорт. */
[data-vibeui-block="item-004"] [data-part="chevron"]{
flex:none;color:var(--vibeui-item-004-accent);font-size:0.875rem;line-height:1;
transition:transform .15s ease;
}
[data-vibeui-block="item-004"]:hover [data-part="chevron"],
[data-vibeui-block="item-004"]:focus-visible [data-part="chevron"]{transform:translateX(2px)}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="item-004"] *{animation:none!important;transition:none!important}}
`
/**
* Строка-ссылка: корень блока сам является тегом a.
* Один файл, ноль зависимостей, собственная палитра.
*/
export function Item004({
title = "Настройки уведомлений",
meta = "Почта, телеграм и еженедельная сводка",
hint = "12",
href = "#",
accent,
className,
style,
...props
}: Item004Props) {
const palette = {
...(accent ? { "--vibeui-item-004-accent": accent } : null),
...style,
} as CSSProperties
return (
<>
<style href="vibeui-item-004" precedence="medium">
{STYLES}
</style>
<a
{...props}
href={href}
data-vibeui-block="item-004"
className={className}
style={palette}
>
<span data-part="text">
<span data-part="title">{title}</span>
{meta ? <span data-part="meta">{meta}</span> : null}
</span>
{hint ? <span data-part="hint">{hint}</span> : null}
<span data-part="chevron" aria-hidden="true">
→
</span>
</a>
</>
)
}