Display
List Row
A list row with a link covering the whole area: the focus ring lands on the row, not on the title alone.
- item
- list
- row
- link
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/item-001?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-001" (List 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-001.json
Registry item: https://vibeui.ru/r/item-001.json
Installs to: components/vibeui/item-001.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 list row with a link covering the whole area: the focus ring lands on the row, not on the title alone.
A list row: a title link covering the row, a secondary line below, and a value with a status on the right. Zero dependencies, one file, no client JS.
## 3. How to use it
import { Item001 } from "@/components/vibeui/item-001"
<Item001 title="Invoice 300" value="$240" href="/invoices/300" />
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-001-* palette — do not swap it for your theme tokens
- the stretched link: the target is the row, not the title
- the focus ring on the row via :has(a:focus-visible)
- tabular figures on the value — that is what rows get compared by
- the li element: rows belong in a list, not a pile of divs
- the two-column grid keeping value and status on the right
## 6. You may change
- title, meta, value and status
- href — the row's target
- the accent through the accent prop
- the row width
## 7. Rules
- No second link inside the row: the stretched one would cover it.
- With several actions do not stretch the link — make the button its own target, as in card-004.
- Wrap the rows in a <ul>: a lone li outside a list is invalid.
- 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-001.jsonhttps://vibeui.ru/r/item-001.jsonКомпонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-item-001-*. Серверный: хуков нет. Ссылка растянута псевдоэлементом ::after, обводка фокуса ставится на корень через :has(a:focus-visible). Корень — <li>, поэтому строки кладутся в обычный список. Значение выровнено вправо табличными цифрами.
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 Item001Props = Omit<
ComponentPropsWithoutRef<"li">,
"children" | "title"
> & {
title?: string
meta?: string
value?: string
status?: string
href?: string
accent?: string
}
// Идея компонента: строка списка с ссылкой на всю площадь. Ссылка растянута
// псевдоэлементом, но текст остаётся выделяемым, а обводка фокуса ставится на
// строку целиком: подсвеченное только название выглядит поломкой. Значение
// стоит справа табличными цифрами — по нему сравнивают строки.
const STYLES = `
:where([data-vibeui-block="item-001"]){
--vibeui-item-001-bg:oklch(1 0 0);
--vibeui-item-001-fg:oklch(0.22 0.014 265);
--vibeui-item-001-muted:oklch(0.56 0.014 265);
--vibeui-item-001-border:oklch(0.9 0.006 265);
--vibeui-item-001-hover:oklch(0.975 0.002 265);
--vibeui-item-001-accent:oklch(0.55 0.17 265);
--vibeui-item-001-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
[data-vibeui-block="item-001"]{
position:relative;display:grid;grid-template-columns:1fr auto;
align-items:center;gap:0.125rem 0.75rem;
width:100%;max-width:22rem;box-sizing:border-box;padding:0.625rem 0.75rem;
list-style:none;
background:var(--vibeui-item-001-bg);
border:1px solid var(--vibeui-item-001-border);border-radius:0.75rem;
font-family:var(--vibeui-item-001-font);color:var(--vibeui-item-001-fg);
}
[data-vibeui-block="item-001"]:hover{background:var(--vibeui-item-001-hover)}
[data-vibeui-block="item-001"] a{color:inherit;text-decoration:none}
/* Ссылка на всю строку, но обводка фокуса — на строке, а не на названии. */
[data-vibeui-block="item-001"] a::after{content:"";position:absolute;inset:0;border-radius:inherit}
[data-vibeui-block="item-001"] a:focus-visible{outline:none}
[data-vibeui-block="item-001"]:has(a:focus-visible){outline:2px solid var(--vibeui-item-001-accent);outline-offset:2px}
[data-vibeui-block="item-001"] [data-part="title"]{font-size:0.875rem;font-weight:650;line-height:1.3}
[data-vibeui-block="item-001"] [data-part="meta"]{grid-column:1;font-size:0.75rem;color:var(--vibeui-item-001-muted)}
[data-vibeui-block="item-001"] [data-part="value"]{
grid-column:2;grid-row:1;justify-self:end;
font-size:0.875rem;font-weight:680;font-variant-numeric:tabular-nums;
}
[data-vibeui-block="item-001"] [data-part="status"]{
grid-column:2;grid-row:2;justify-self:end;
font-size:0.6875rem;color:var(--vibeui-item-001-muted);
}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="item-001"] *{animation:none!important;transition:none!important}}
`
/**
* Строка списка: ссылка на всю площадь, значение справа табличными цифрами.
* Один файл, ноль зависимостей, собственная палитра.
*/
export function Item001({
title = "Счёт № 300 · ООО «Полёт»",
meta = "Выставлен 12 марта, оплата до 20 марта",
value = "24 000 ₽",
status = "Ожидает оплаты",
href = "#",
accent,
className,
style,
...props
}: Item001Props) {
const palette = {
...(accent ? { "--vibeui-item-001-accent": accent } : null),
...style,
} as CSSProperties
return (
<>
<style href="vibeui-item-001" precedence="medium">
{STYLES}
</style>
<li
{...props}
data-vibeui-block="item-001"
className={className}
style={palette}
>
<span data-part="title">
{href ? <a href={href}>{title}</a> : title}
</span>
{value ? <span data-part="value">{value}</span> : null}
{meta ? <span data-part="meta">{meta}</span> : null}
{status ? <span data-part="status">{status}</span> : null}
</li>
</>
)
}